Password Safe deposit box

Source: Internet
Author: User

"Topic Requirements

Find the corresponding login name based on the number entered by the user

Automatically copy the password corresponding to this login name to the Clipboard

"Program implementation
1 #!/usr/bin/env python2 ImportPyperclip3Information = {4     "wifi Password":"1",5     "Blog Park Login name":"2",6 }7 8Information01 = {9     "1":"wifi Password",Ten     "2":"Blog Park Login name", One } A  -passwords = { -     "1":"39322438", the     "2":"Neverctrl_c", - } -  -PASSWORDS01 = { +     "wifi Password":"39322438", -     "Blog Park Login name":"Neverctrl_c", + } A  at  whileTrue: -     Print("notice:the Word of name is represent all of the account name.") -     Print("Please input the account name (\ "\": Quit):") -Account =input () -     if ""==Account : -          Break in     if "name"==Account : -          forKvinchInformation.items (): to             Print(K.ljust (20,".") + V.rjust (5,".")) +     if "Password"==Account : -          forKvinchPasswords01.items (): the             Print(K.ljust (10,".") + V.rjust (20,".")) *     ifAccountinchpasswords: $ pyperclip.copy (Passwords[account])Panax Notoginseng         Print("The content of"+ information01.get (account,"haha") +"Have been copied to clipboard") -     Else: the         Print("There is no content about"+Account ) +         Print("GO on". Center (60,"="))
View CodeThe purpose of the procedure

Proficiency in the use of dictionary related methods: keys () VALUES () items ()

Proficiency in the use of string-related methods: Ljust () rjust () center ()

Master pyperclip.copy () Pyperclip.paste ()

"Program Improvement

Use a batch file to execute this program

Three less for a long time did not eat hot pot, has no updated mood, so update in ...

  

Password Safe deposit box

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.