Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias Assign NameStore ListLoad Str Str Str Str Str FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return Str decorator_list FunctionDef arguments args NameParam defaults body For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq NameLoad Str body Assign NameStore NameLoad TryFinally body TryExcept body If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Str Assign NameStore NameLoad If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Expr Call NameLoad NameLoad NameLoad Str orelse If CompareEq NameLoad Str body Expr Call NameLoad NameLoad NameLoad Str orelse If CompareEq NameLoad Str body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad orelse Raise Call NameLoad Str handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad TryFinally body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str NameLoad Str NameLoad If CompareNotEq NameLoad Num body Raise Call NameLoad Str finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A 
zip_util provides helpers for unzipping a few standard archive types when
the user uploads an archive of a known type.
 N/A os N/A shutil N/A subprocess N/A tarfile N/A tempfile codalab.common UsageError codalab.lib path_util file_util worker.file_util un_tar_directory un_gzip_stream N/A ARCHIVE_EXTS N/A .tar.gz .tgz .tar.bz2 .zip .gz path_is_archive N/A N/A path N/A N/A N/A N/A isinstance path basestring N/A N/A ext ARCHIVE_EXTS N/A N/A N/A N/A path endswith ext N/A N/A True N/A False N/A get_archive_ext N/A N/A fname N/A N/A N/A Returns the extension for fname if it's an archive, empty string otherwise. N/A ext ARCHIVE_EXTS N/A N/A N/A N/A fname endswith ext N/A N/A ext N/A N/A strip_archive_ext N/A N/A path N/A N/A N/A ext ARCHIVE_EXTS N/A N/A N/A N/A path endswith ext N/A N/A N/A path N/A N/A N/A len ext N/A N/A UsageError N/A Not an archive: %s path N/A unpack N/A N/A ext source dest_path N/A N/A N/A 
    Unpack the archive |source| to |dest_path|.
    Note: |source| can be a file handle or a path.
    |ext| contains the extension of the archive.
     N/A N/A ext .zip N/A N/A close_source False N/A N/A N/A N/A N/A N/A isinstance source basestring N/A N/A source N/A open source rb N/A close_source True N/A N/A N/A ext .tar.gz N/A ext .tgz N/A N/A N/A un_tar_directory source dest_path gz N/A N/A N/A ext .tar.bz2 N/A N/A N/A un_tar_directory source dest_path bz2 N/A N/A N/A ext .gz N/A N/A N/A open dest_path wb f N/A N/A N/A N/A shutil copyfileobj N/A un_gzip_stream source f N/A N/A N/A UsageError Not an archive. N/A N/A N/A N/A N/A tarfile TarError IOError N/A N/A N/A UsageError Invalid archive upload. N/A N/A close_source N/A N/A N/A N/A source close N/A N/A delete_source False N/A N/A N/A N/A N/A isinstance source basestring N/A N/A temp_path N/A dest_path .zip N/A N/A open temp_path wb f N/A N/A N/A N/A shutil copyfileobj source f N/A source temp_path N/A delete_source True N/A exitcode N/A N/A subprocess call N/A unzip -q source -d dest_path N/A N/A exitcode 0 N/A N/A N/A UsageError Invalid archive upload. N/A N/A delete_source N/A N/A N/A N/A path_util remove source N/A