|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.PyObject
org.python.core.util.importer<PyObject>
org.python.modules.zipimport.zipimporter
public class zipimporter
Import Python modules and packages from ZIP-format archives.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary | |
---|---|
static PyString |
__doc__
|
String |
archive
Pathname of the Zip archive |
PyObject |
files
Dict with file info {path: tocEntry} |
String |
prefix
File prefix: "a/sub/directory/" |
static PyType |
TYPE
|
Constructor Summary | |
---|---|
zipimporter()
|
|
zipimporter(PyType subType)
|
|
zipimporter(String path)
|
Method Summary | |
---|---|
PyObject |
find_module(String fullname)
|
PyObject |
find_module(String fullname,
String path)
Find the module for the fully qualified name. |
PyObject |
get_code(String fullname)
Return the code object associated with the module. |
String |
get_data(String path)
Return the uncompressed data for the file at the specified path as a String. |
String |
get_source(String fullname)
Return the source code for the module as a string (using newline characters for line endings) |
boolean |
is_package(String fullname)
Return a boolean signifying whether the module is a package or not. |
PyObject |
load_module(String fullname)
Load a module for the fully qualified name. |
org.python.modules.zipimport.zipimporter.ZipBundle |
makeBundle(String datapath,
PyObject entry)
Given a path to a compressed file in the archive, return the file's (uncompressed) data stream in a ZipBundle. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PyType TYPE
public static final PyString __doc__
public String archive
public String prefix
public PyObject files
Constructor Detail |
---|
public zipimporter()
public zipimporter(PyType subType)
public zipimporter(String path)
Method Detail |
---|
public PyObject find_module(String fullname)
public PyObject find_module(String fullname, String path)
fullname
- the fully qualified name of the modulepath
- if not installed on the meta-path None or a module path
public PyObject load_module(String fullname)
fullname
- the fully qualified name of the module
public String get_data(String path)
path
- a String path name within the archive
public boolean is_package(String fullname)
fullname
- the fully qualified name of the module
public PyObject get_code(String fullname)
fullname
- the fully qualified name of the module
public String get_source(String fullname)
fullname
- the fully qualified name of the module
public org.python.modules.zipimport.zipimporter.ZipBundle makeBundle(String datapath, PyObject entry)
datapath
- file's filename inside of the archive
public String toString()
toString
in class PyObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |