(prompt='Password: ', title='Password',
                 text='Enter your password', hidden=True, gui=False,
                 validator=None)
Gets a password or other auth token on console or gui with custom prompts.

  Args:
    prompt: string with the password prompt
    title: string for title of window
    text: string for promp text
    hidden: bool whether to show user input
    gui: bool, whether to use GUI
    validator: compiled regex
  Returns:
    password as string
  Raises:
    KeyboardInterrupt: User cancelled request with keyboard interrupt (Ctrl+C)
    EOFError: If password is empty
Gets a password or other auth token on console or gui with custom prompts.
Gets a password or other auth token on console or gui with custom prompts .
def GetAuthToken(prompt='Password: ', title='Password',
                 text='Enter your password', hidden=True, gui=False,
                 validator=None):
  """Gets a password or other auth token on console or gui with custom prompts.

  Args:
    prompt: string with the password prompt
    title: string for title of window
    text: string for promp text
    hidden: bool whether to show user input
    gui: bool, whether to use GUI
    validator: compiled regex
  Returns:
    password as string
  Raises:
    KeyboardInterrupt: User cancelled request with keyboard interrupt (Ctrl+C)
    EOFError: If password is empty
  """
  while True:
    if gui:
      password = _GetPasswordGUI(title=title, text=text, hidden=hidden)
    else:
      password = _GetPasswordInteractively(prompt=prompt, hidden=hidden)
    if validator:
      if validator.match(password):
        return password
    else:
      return password
def GetAuthToken ( prompt = 'Password: ' , title = 'Password' , text = 'Enter your password' , hidden = True , gui = False , validator = None ) : while True : if gui : password = _GetPasswordGUI ( title = title , text = text , hidden = hidden ) else : password = _GetPasswordInteractively ( prompt = prompt , hidden = hidden ) if validator : if validator . match ( password ) : return password else : return password