Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Windows Quick call to python

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Quick call of python Program on windows platform

Scenario 1: the account / or password of a cloud platform is relatively long. Once the browser cache expires, it is necessary to look up the email / file. Scenario 2: due to some scenarios, the password is forced to be changed every N days. Simple password box, password saving, automatic copy to pasteboard scene 3:python powerful, wrote a Mini Program, lazy python / dir/XXX.PY directly from the window command window to call python gadget usage: ctrl+r call window command window. Enter custom commands such as pwd to enter the account number / password you need to find

You can automatically copy to the pasteboard for use, and paste ctrl v when you use it

Step1. Precondition, install python, and set to windows path

Add python installation location in path

You can call python directly when you are finished.

Step2. Custom command name such as pwd, registered to path

Window actual directory

The actual content of pwd.bat actually calls the python program.

@ py.exe D:/my-bin/lib/pwd.py@pausestep3 to write python programs

You can do a function list as needed.

Because pasting depends on pyperclip. You just need to pip install it.

#! python3import sys,pyperclipprint ("* * usage: get account or pwd from lib * *") pwds= {'aqiang get account or pwd from lib pawn, 'ali':'longlonglongsoiforgetthename@aliyun.com'} account=input (' plz input accountname:') pwd= pwds [account] print ('% slug% slots% (account,pwd)) pyperclip.copy (pwd)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report