‡Æ
ØMö9c       sÚ   d  Z  d k Z d d „ Z d d „ Z d d „ Z d d „ Z d „  Z y d k Z d k Z Wno e	 j
 oc y d k
 Z
 WnF e	 j
 o: y d	 k l Z Wn e	 j
 o e Z n Xe Z n Xe Z n Xe Z d S(
   s)  Utilities to get a password and/or the current user name.

getpass(prompt) - prompt for a password, with echo turned off
getuser() - get the user name from the environment or password database

On Windows, the msvcrt module will be used.
On the Mac EasyDialogs.AskPassword is used, if available.

Nc    s±   y t  i i ƒ  } Wn t |  ƒ Sn Xt } t i | ƒ } | } | d t i @| d <z& t i | t i | ƒ t |  ƒ } Wd t i | t i | ƒ Xt  i i d ƒ | Sd S(   sR   Prompt for a password, with echo turned off.

	Restore terminal settings at end.
	i   Ns   
(   s   syss   stdins   filenos   fds   default_getpasss   prompts   getpasss   termioss	   tcgetattrs   olds   news   TERMIOSs   ECHOs	   tcsetattrs	   TCSADRAINs
   _raw_inputs   passwds   stdouts   write(   s   prompts   fds   getpasss   olds   news   passwds$   /mit/python/lib/python2.0/getpass.pys   unix_getpass s       s
   Password: c    sÈ   d k  } x |  d r } | i | ƒ q Wd } xt d ol | i ƒ  } | d j p
 | d j o Pn | d j o
 t ‚ n | d j o | d  } n | | } q2 W| i d ƒ | i d ƒ | Sd S(	   s9   Prompt for password with echo off, using Windows getch().Ni    s    i   s   s   
s   s   (   s   msvcrts   prompts   cs   putchs   pws   getchs   KeyboardInterrupt(   s   prompts   msvcrts   cs   pws$   /mit/python/lib/python2.0/getpass.pys   win_getpass* s&     		  
c    s   d GHt  |  ƒ Sd  S(   Ns7   Warning: Problem with getpass. Passwords may be echoed.(   s
   _raw_inputs   prompt(   s   prompts$   /mit/python/lib/python2.0/getpass.pys   default_getpass? s    c    sz   d  k  } t |  ƒ }  |  o | i i |  ƒ n | i i ƒ  } | o
 t ‚ n | d d j o | d  } n | Sd  S(   Ni   s   
(	   s   syss   strs   prompts   stdouts   writes   stdins   readlines   lines   EOFError(   s   prompts   syss   lines$   /mit/python/lib/python2.0/getpass.pys
   _raw_inputD s    	
s    c     sm   d k  }  x= d d d d f d r' } |  i i | ƒ } | o | Sn q Wd k } | i |  i ƒ  ƒ d Sd S(   s¹   Get the username from the environment or password database.

	First try various environment variables, then the password
	database.  This works on Windows as long as USERNAME is set.

	Ns   LOGNAMEs   USERs   LNAMEs   USERNAMEi    (   s   oss   names   environs   gets   users   pwds   getpwuids   getuid(   s   oss   names   users   pwds$   /mit/python/lib/python2.0/getpass.pys   getuserS s     	 	(   s   AskPassword(   s   __doc__s   syss   unix_getpasss   win_getpasss   default_getpasss
   _raw_inputs   getusers   termioss   TERMIOSs   ImportErrors   msvcrts   EasyDialogss   AskPasswords   getpass(    s$   /mit/python/lib/python2.0/getpass.pys   ?	 s&   		