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.modules
Class imp

    java.lang.Object
      org.python.modules.imp

    public class imp

extends Object

Field Summary
`static PyString` | `__doc__`
`static int` | `C_BUILTIN`
`static int` | `C_EXTENSION`
`static int` | `IMP_HOOK`
`static int` | `PKG_DIRECTORY`
`static int` | `PY_COMPILED`
`static int` | `PY_FROZEN`
`static int` | `PY_SOURCE`

Constructor Summary
`imp()`

Method Summary
`static void` | `acquire_lock()` Acquires the interpreter's import lock for the current thread.
`static PyObject` | `find_module(String name)`
`static PyObject` | `find_module(String name, PyObject path)`
`static PyObject` | `get_suffixes()`
`static boolean` | `is_builtin(String name)`
`static boolean` | `is_frozen(String name)`
`static PyObject` | `load_compiled(String name, String pathname)`
`static PyObject` | `load_compiled(String name, String pathname, PyObject file)`
`static PyObject` | `load_dynamic(String name, String pathname)`
`static PyObject` | `load_dynamic(String name, String pathname, PyObject file)`
`static PyObject` | `load_module(String name, PyObject file, PyObject filename, PyTuple data)`
`static PyObject` | `load_source(String modname, String filename)`
`static PyObject` | `load_source(String modname, String filename, PyObject file)`
`static boolean` | `lock_held()` Return true if the import lock is currently held, else false.
`static PyModule` | `new_module(String name)`
`static void` | `release_lock()` Release the interpreter's import lock.

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

Field Detail

### __doc__

    public static PyString __doc__

### PY_SOURCE

    public static final int PY_SOURCE

See Also:
  Constant Field Values

### PY_COMPILED

    public static final int PY_COMPILED

See Also:
  Constant Field Values

### C_EXTENSION

    public static final int C_EXTENSION

See Also:
  Constant Field Values

### PKG_DIRECTORY

    public static final int PKG_DIRECTORY

See Also:
  Constant Field Values

### C_BUILTIN

    public static final int C_BUILTIN

See Also:
  Constant Field Values

### PY_FROZEN

    public static final int PY_FROZEN

See Also:
  Constant Field Values

### IMP_HOOK

    public static final int IMP_HOOK

See Also:
  Constant Field Values

Constructor Detail

### imp

    public imp()

Method Detail

### load_dynamic

    public static PyObject load_dynamic(String name,
                                        String pathname)

### load_dynamic

    public static PyObject load_dynamic(String name,
                                        String pathname,
                                        PyObject file)

### load_source

    public static PyObject load_source(String modname,
                                       String filename)

### load_source

    public static PyObject load_source(String modname,
                                       String filename,
                                       PyObject file)

### load_compiled

    public static PyObject load_compiled(String name,
                                         String pathname)

### load_compiled

    public static PyObject load_compiled(String name,
                                         String pathname,
                                         PyObject file)

### find_module

    public static PyObject find_module(String name)

### find_module

    public static PyObject find_module(String name,
                                       PyObject path)

### load_module

    public static PyObject load_module(String name,
                                       PyObject file,
                                       PyObject filename,
                                       PyTuple data)

### get_suffixes

    public static PyObject get_suffixes()

### new_module

    public static PyModule new_module(String name)

### is_builtin

    public static boolean is_builtin(String name)

### is_frozen

    public static boolean is_frozen(String name)

### acquire_lock

    public static void acquire_lock()

  Acquires the interpreter's import lock for the current thread. This lock should be used by import hooks to ensure thread-safety when importing modules.

### release_lock

    public static void release_lock()

  Release the interpreter's import lock.

### lock_held

    public static boolean lock_held()

  Return true if the import lock is currently held, else false.

  Returns:
    true if the import lock is currently held, else false.

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