#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    7
    Rep Power
    0

    Lightbulb [input] password input for the shell


    Hello,
    I want to get a password with my program in the command line. Is there a function to get a password without show it in the shell like , for example, input_passwd() ?
    thanks
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Yeah there is, what you're looking for would be named 'getpass' i.e.

    Code:
    >>> import getpass
    >>> passwd = getpass.getpass()
    ...
    >>>
    You can use this just like raw_input() but it shouldn't echo what the user types...

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    7
    Rep Power
    0

    Talking


    Thank you, it works more securely now
    Bye
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    No problem..

    Mark
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo