C# Class IronPython.Runtime.ZipImportModule.zipimporter

Exibir arquivo Open project: jdhardy/ironpython

Public Methods

Method Description
__repr__ ( ) : string
zipimporter ( CodeContext context, object pathObj, object>.[ kwArgs ) : System

Private Methods

Method Description
GetCodeFromData ( CodeContext context, bool ispackage, bool isbytecode, int mtime, PythonTuple toc_entry ) : string

Return the code object for the module named by 'fullname' from the Zip archive as a new reference.

GetData ( string archive, PythonTuple toc_entry ) : byte[]

Given a path to a Zip file and a toc_entry, return the (uncompressed) data as a new reference.

GetModuleCode ( CodeContext context, string fullname, bool &ispackage, string &modpath ) : string
GetModuleInfo ( CodeContext context, string fullname ) : ModuleStatus

Determines the type of module we have (package or module, or not found).

GetSubName ( string fullname ) : string
MakeFilename ( string prefix, string name ) : string

Given a (sub)modulename, write the potential file path in the archive (without extension) to the path buffer.

ReadDirectory ( string archive ) : PythonDictionary

Given a path to a Zip archive, build a dict, mapping file names (local to the archive, using SEP as a separator) to toc entries. A toc_entry is a tuple: (__file__, # value to use for __file__, available for all files compress, # compression kind; 0 for uncompressed data_size, # size of compressed data on disk file_size, # size of decompressed data file_offset, # offset of file header from start of archive time, # mod time of file (in dos format) date, # mod data of file (in dos format) crc, # crc checksum of the data ) Directories can be recognized by the trailing SEP in the name, data_size and file_offset are 0.

find_module ( CodeContext context, string fullname ) : object
get_code ( CodeContext context, string fullname ) : string
get_data ( CodeContext context, string path ) : string
get_filename ( CodeContext context, string fullname ) : string
get_source ( CodeContext context, string fullname ) : string
is_package ( CodeContext context, string fullname ) : bool
load_module ( CodeContext context, string fullname ) : object
zipimporter ( ) : System

Method Details

__repr__() public method

public __repr__ ( ) : string
return string

zipimporter() public method

public zipimporter ( CodeContext context, object pathObj, object>.[ kwArgs ) : System
context CodeContext
pathObj object
kwArgs object>.[
return System