Quick call to write your own Python applet on Windows

Source: Internet
Author: User
Tags browser cache

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:
    1. Ctrl+r to bring up Window command windows.
    2. Enter custom commands such as PWD
    3. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.