Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.python.core
Class imp

    java.lang.Object
      |
      +--org.python.core.imp

public class imp
extends java.lang.Object

Utility functions for "import" support.

Field Summary
`static int` | `APIVersion`

Method Summary
`static PyModule` | `addModule(java.lang.String name)`
`static byte[]` | `compileSource(java.lang.String name, java.io.File file)`
`static byte[]` | `compileSource(java.lang.String name, java.io.File file, java.lang.String filename, java.lang.String outFilename)`
`static java.lang.ClassLoader` | `getSyspathJavaLoader()`
`static PyObject` | `import_name(java.lang.String name, boolean top, PyObject modDict)`
`static void` | `importAll(java.lang.String mod, PyFrame frame)` Called from jpython generated code when a statement like "from spam.eggs import *" is executed.
`static PyObject[]` | `importFrom(java.lang.String mod, java.lang.String[] names, PyFrame frame)` Called from jpython generated code when a stamenet like "from spam.eggs import foo, bar" is executed.
`static PyObject[]` | `importFromAs(java.lang.String mod, java.lang.String[] names, java.lang.String[] asnames, PyFrame frame)` Called from jpython generated code when a stamenet like "from spam.eggs import foo as spam" is executed.
`static PyObject` | `importName(java.lang.String name, boolean top)`
`static PyObject` | `importName(java.lang.String name, boolean top, PyObject modDict)`
`static PyObject` | `importOne(java.lang.String mod, PyFrame frame)` Called from jpython generated code when a statement like "import spam" is executed.
`static PyObject` | `importOneAs(java.lang.String mod, PyFrame frame)` Called from jpython generated code when a statement like "import spam as foo" is executed.
`static PyObject` | `load(java.lang.String name)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### APIVersion

    public static final int APIVersion

See Also:
  Constant Field Values

Method Detail

### addModule

    public static PyModule addModule(java.lang.String name)

### compileSource

    public static byte[] compileSource(java.lang.String name,
                                       java.io.File file)

### compileSource

    public static byte[] compileSource(java.lang.String name,
                                       java.io.File file,
                                       java.lang.String filename,
                                       java.lang.String outFilename)

### getSyspathJavaLoader

    public static java.lang.ClassLoader getSyspathJavaLoader()

### load

    public static PyObject load(java.lang.String name)

### import_name

    public static PyObject import_name(java.lang.String name,
                                       boolean top,
                                       PyObject modDict)

### importName

    public static PyObject importName(java.lang.String name,
                                      boolean top)

### importName

    public static PyObject importName(java.lang.String name,
                                      boolean top,
                                      PyObject modDict)

### importOne

    public static PyObject importOne(java.lang.String mod,
                                     PyFrame frame)

  Called from jpython generated code when a statement like "import spam" is executed.

### importOneAs

    public static PyObject importOneAs(java.lang.String mod,
                                       PyFrame frame)

  Called from jpython generated code when a statement like "import spam as foo" is executed.

### importFrom

    public static PyObject[] importFrom(java.lang.String mod,
                                        java.lang.String[] names,
                                        PyFrame frame)

  Called from jpython generated code when a stamenet like "from spam.eggs import foo, bar" is executed.

### importFromAs

    public static PyObject[] importFromAs(java.lang.String mod,
                                          java.lang.String[] names,
                                          java.lang.String[] asnames,
                                          PyFrame frame)

  Called from jpython generated code when a stamenet like "from spam.eggs import foo as spam" is executed.

### importAll

    public static void importAll(java.lang.String mod,
                                 PyFrame frame)

  Called from jpython generated code when a statement like "from spam.eggs import *" is executed.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Jython homepage