Quick Python program calls on Windows platform
Scenario 1: A cloud Platform account/or password longer, once the browser cache fails, it is necessary to go to the Mail/file search, time-consuming and laborious Scenario 2: Due to certain scenarios, forcing every n days to change the password. Simple password box, password save, automatic copy to Pasteboard scene 3:python powerful, write a small program, too lazy to python/dir/xxx. PY invokes the Python gadget usage method directly from the Windows command window:
- Ctrl+r to bring up Window command windows.
- Enter custom commands such as PWD
- Enter the account/password you need to find
You can automatically copy to the Clipboard for use, when using Ctrl v Paste
Step1. Pre-conditions, install Python, and set the Windows path
Add Python installation location in path
Python can be called directly after completion
Step2. Custom command name such as PWD, register to Path
Window actual Directory
Pwd.bat the actual content, actually called the Python program
@py.exe D:/my-bin/lib/pwd.py@pause
Step3 writing a Python program
You can do a function list on demand.
Because of the paste dependency pyperclip. You need pip install
#!python3import sys,pyperclipprint("** usage: get account or pwd from lib **")pwds={‘a‘:‘pa‘, ‘b‘:‘pb‘, ‘ali‘:‘[email protected]‘ }account=input(‘plz input accountname: ‘)pwd=pwds[account]print(‘%s:%s‘%(account,pwd))pyperclip.copy(pwd)
Quick call to write your own Python applet on Windows