Module Expr Str ImportFrom alias Assign NameStore Str Import alias Import alias Import alias Import alias Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults NameLoad body Import alias Assign NameStore Str Assign NameStore Str If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body If UnaryOpNot NameLoad body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad orelse If BoolOpAnd NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Assign NameStore BoolOpOr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If NameLoad body Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Num NameLoad orelse Assign NameStore ListLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return Call AttributeLoad NameLoad attr Num orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareNotIn NameLoad TupleLoad Str Str body Raise Call NameLoad BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd Str NameLoad Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd Str NameLoad Str If UnaryOpNot NameLoad body If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd BinOpAdd ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad ListLoad NameLoad If NameLoad body AugAssignAdd NameStore NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Call NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Assign NameStore Num orelse Assign NameStore NameLoad Assign NameStore Num If BoolOpAnd UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str orelse Return NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str If Call NameLoad NameLoad NameLoad body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpAdd BinOpAdd NameLoad Str Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Return NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Import alias Assign NameStore Call NameLoad NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A Contains configuration and read/write utility functions for GoogleCL. __future__ with_statement N/A __author__ tom.h.miller@gmail.com (Tom Miller) N/A logging N/A os N/A re N/A googlecl.config.parser N/A SUBDIR_NAME googlecl N/A DEFAULT_GOOGLECL_DIR N/A N/A N/A os path expanduser N/A N/A N/A os path join ~ .googlecl N/A HISTORY_FILENAME history N/A TOKENS_FILENAME_FORMAT access_tok_%s N/A DEVKEY_FILENAME yt_devkey N/A FILE_EXT_PATTERN N/A N/A re compile .*\.([a-zA-Z0-9]{2,}$) N/A LOGGER_NAME __name__ N/A LOG N/A N/A logging getLogger LOGGER_NAME determine_terminal_encoding N/A N/A config N/A None N/A N/A sys N/A in_enc N/A out_enc N/A N/A N/A sys stdin encoding N/A N/A in_enc N/A N/A sys stdin encoding N/A N/A N/A sys stdout encoding N/A N/A out_enc N/A N/A sys stdout encoding N/A N/A N/A N/A in_enc lower N/A N/A out_enc lower N/A N/A N/A in_enc N/A N/A return_enc None N/A N/A config None N/A N/A return_enc N/A N/A config safe_get GENERAL default_encoding N/A N/A return_enc None N/A N/A return_enc N/A N/A sys getdefaultencoding N/A N/A return_enc in_enc N/A N/A N/A in_enc out_enc N/A N/A N/A N/A LOG warning HEY! You have a different encoding for input and output N/A N/A N/A LOG warning N/A Input:  in_enc N/A N/A N/A LOG warning N/A Output:  in_enc N/A return_enc N/A out_enc in_enc N/A N/A N/A LOG debug N/A determine_terminal_encoding():  return_enc N/A return_enc N/A N/A TERMINAL_ENCODING N/A determine_terminal_encoding SafeEncodeError N/A Exception N/A N/A N/A SafeDecodeError N/A Exception N/A N/A N/A build_titles_list N/A N/A title args N/A N/A N/A Build a list of titles from the 'title' option and arguments.

    Args:
      title: NoneType or unicode Title given to options.title
      args: list Leftover arguments on the command line, presumably extra titles.

    Returns:
      List of strings or [None].

     N/A args N/A N/A titles_list args N/A title N/A N/A N/A N/A titles_list insert 0 title N/A N/A titles_list N/A title N/A titles_list N/A get_extension_from_path N/A N/A path N/A N/A N/A Return the extension of a file. N/A match N/A N/A FILE_EXT_PATTERN match path N/A match N/A N/A N/A N/A match group 1 N/A N/A None N/A get_data_path N/A N/A filename default_directories create_missing_dir N/A None False N/A N/A Get the full path to the history file.

    See googlecl.get_xdg_path()
     N/A N/A get_xdg_path filename DATA default_directories create_missing_dir N/A get_xdg_path N/A N/A filename data_type default_directories create_missing_dir N/A None False N/A N/A Get the full path to a file using XDG file layout spec.

    Follows XDG Base Directory Specification.
    (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).
    Tries default_directories and DEFAULT_GOOGLECL_DIR if no file is found
    via XDG spec.

    Keyword arguments:
      filename: Filename of the file.
      data_type: One of 'config' for config files or 'data' for data files.
      default_directories: List of directories to check if no file is found
          in directories specified by XDG spec and DEFAULT_GOOGLECL_DIR.
          Default None.
      create_missing_dir: Whether or not to create a missing config subdirectory
          in the default base directory. Default False.

    Returns:
      Path to config file, which may not exist. If create_missing_dir,
      the directory where the config file should be will be created if it
      does not exist.

     N/A data_type N/A N/A data_type upper N/A N/A data_type N/A CONFIG DATA N/A N/A N/A Exception N/A Invalid value for data_type:  data_type N/A xdg_home_dir N/A N/A N/A os environ get N/A N/A XDG_ data_type _HOME N/A N/A xdg_home_dir N/A N/A home_dir N/A N/A N/A os path expanduser ~ N/A N/A data_type DATA N/A N/A xdg_home_dir N/A N/A N/A os path join home_dir .local share N/A N/A N/A data_type CONFIG N/A N/A xdg_home_dir N/A N/A N/A os path join home_dir .config N/A xdg_home_dir N/A N/A N/A os path join xdg_home_dir SUBDIR_NAME N/A xdg_dir_list N/A N/A N/A os environ get N/A N/A XDG_ data_type _DIRS N/A N/A xdg_dir_list N/A N/A N/A data_type DATA N/A N/A xdg_dir_list /usr/local/share/:/usr/share/ N/A N/A N/A data_type CONFIG N/A N/A xdg_dir_list /etc/xdg N/A xdg_dir_list N/A N/A N/A N/A os path join d SUBDIR_NAME N/A d N/A N/A xdg_dir_list split : N/A dir_list N/A N/A N/A N/A N/A N/A os path abspath . xdg_home_dir xdg_dir_list N/A DEFAULT_GOOGLECL_DIR N/A default_directories N/A N/A dir_list default_directories N/A directory dir_list N/A N/A config_path N/A N/A N/A os path join directory filename N/A N/A N/A N/A os path isfile config_path N/A N/A config_path N/A N/A N/A LOG debug N/A N/A N/A Could not find  filename  in any of  N/A str dir_list N/A N/A N/A os name posix N/A N/A default_dir xdg_home_dir N/A mode 448 N/A N/A default_dir DEFAULT_GOOGLECL_DIR N/A mode 511 N/A N/A N/A N/A N/A N/A os path isdir default_dir create_missing_dir N/A N/A N/A N/A N/A N/A os makedirs default_dir mode N/A N/A N/A OSError N/A err N/A N/A N/A N/A LOG error err N/A N/A N/A N/A N/A os path join default_dir filename N/A read_devkey N/A N/A N/A N/A N/A Return the cached YouTube developer's key. N/A key_path N/A get_data_path DEVKEY_FILENAME N/A devkey None N/A N/A N/A N/A os path exists key_path N/A N/A N/A open key_path r key_file N/A N/A devkey N/A N/A N/A N/A key_file read strip N/A devkey N/A safe_encode N/A N/A string target_encoding errors N/A TERMINAL_ENCODING backslashreplace N/A N/A Encode a unicode string to target_encoding.

    If given a str type, check to see that target_encoding can decode it
    without an error. Raises a SafeEncodeError if it can't.
    Given any other type, returns str() version of it.

    Args:
      string: unicode String to encode.
      target_encoding: str Encoding to encode to. Default TERMINAL_ENCODING.
      errors: str Name of the error handler to call if something goes wrong.
              See docs on the codecs module. Default 'backslashreplace'.

    Returns:
      A string encoded with target_encoding, or raises an error.

     N/A N/A isinstance string unicode N/A N/A N/A N/A string encode target_encoding errors N/A N/A N/A isinstance string str N/A N/A N/A N/A N/A N/A string decode target_encoding N/A N/A N/A UnicodeDecodeError N/A N/A N/A SafeEncodeError Passed a non-unicode string to safe_encode! N/A N/A string N/A N/A N/A str string N/A safe_decode N/A N/A string current_encoding errors N/A utf-8 strict N/A N/A Decode a byte string.

    Raises a SafeDecodeError if current_encoding cannot decode the string and
    the value of errors causes an exception to be raised.
    If given a unicde type, returns it immediately.
    Given any other type, returns unicode() version of it.

    Args:
      string: str String to decode.
      target_encoding: str Encoding to decode with. Default 'utf-8'.
      errors: str Name of the error handler to call if something goes wrong.
              See docs on the codecs module. Default 'strict'.

    Returns:
      A unicode string, or raises an error.

     N/A N/A isinstance string str N/A N/A N/A N/A N/A N/A string decode current_encoding errors N/A N/A N/A UnicodeDecodeError N/A N/A N/A SafeDecodeError N/A N/A current_encoding  could not decode  N/A repr string N/A N/A N/A isinstance string unicode N/A N/A string N/A N/A N/A unicode string N/A write_devkey N/A N/A devkey N/A N/A N/A Write the devkey to the youtube devkey file. N/A stat N/A key_path N/A get_data_path DEVKEY_FILENAME N/A N/A open key_path w key_file N/A N/A N/A N/A os chmod key_path N/A N/A stat S_IRUSR N/A stat S_IWUSR N/A N/A N/A key_file write devkey N/A