Class ZipFileImporter

  • All Implemented Interfaces:
    java.io.Serializable

    public class ZipFileImporter
    extends PyObject
    Load python source from jar or zip files.
    See Also:
    Serialized Form
    • Constructor Detail

      • ZipFileImporter

        public ZipFileImporter​(PyObject path)
        If this path is not an archive (.zip or .jar) then raise an ImportError, otherwise this instance will handle this path.
        Parameters:
        path - the path to check for modules
    • Method Detail

      • find_module

        public PyObject find_module​(java.lang.String name)
        Find the module for the fully qualified name.
        Parameters:
        name - the fully qualified name of the module
        Returns:
        a loader instance if this importer can load the module, None otherwise
      • find_module

        public PyObject find_module​(java.lang.String name,
                                    PyObject path)
        Find the module for the fully qualified name.
        Parameters:
        name - the fully qualified name of the module
        path - if installed on the meta-path None or a module path
        Returns:
        a loader instance if this importer can load the module, None otherwise
      • toString

        public java.lang.String toString()
        Returns a string representation of the object.
        Overrides:
        toString in class PyObject
        Returns:
        a string representation of the object.