|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.python.core.imp
Utility functions for "import" support.
Field Summary | |
static int |
APIVersion
|
Method Summary | |
static PyModule |
addModule(java.lang.String name)
|
static boolean |
caseok(java.io.File file,
java.lang.String filename,
int namelen)
|
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 PyObject |
createFromSource(java.lang.String name,
java.io.InputStream fp,
java.lang.String filename)
|
static java.lang.ClassLoader |
getSyspathJavaLoader()
|
static void |
importAll(java.lang.String mod,
PyFrame frame)
Called from jython 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)
Import a module by name. |
static PyObject |
importName(java.lang.String name,
boolean top,
PyObject modDict)
Import a module by name. |
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)
Load the module by name. |
static PyObject |
loadFromCompiled(java.lang.String name,
java.io.InputStream stream,
java.lang.String filename)
|
static PyObject |
loadFromSource(java.lang.String name,
java.io.InputStream stream,
java.lang.String filename)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int APIVersion
Method Detail |
public static java.lang.ClassLoader getSyspathJavaLoader()
public static PyModule addModule(java.lang.String name)
public static byte[] compileSource(java.lang.String name, java.io.File file)
public static byte[] compileSource(java.lang.String name, java.io.File file, java.lang.String filename, java.lang.String outFilename)
public static PyObject createFromSource(java.lang.String name, java.io.InputStream fp, java.lang.String filename)
public static PyObject loadFromSource(java.lang.String name, java.io.InputStream stream, java.lang.String filename)
public static PyObject loadFromCompiled(java.lang.String name, java.io.InputStream stream, java.lang.String filename)
public static boolean caseok(java.io.File file, java.lang.String filename, int namelen)
public static PyObject load(java.lang.String name)
name
- the name of the module to load
public static PyObject importName(java.lang.String name, boolean top)
name
- the name of the package to importtop
- if true, return the top module in the name, otherwise the last
public static PyObject importName(java.lang.String name, boolean top, PyObject modDict)
name
- the name of the package to importtop
- if true, return the top module in the name, otherwise the lastmodDict
- the __dict__ of an already imported module
public static PyObject importOne(java.lang.String mod, PyFrame frame)
public static PyObject importOneAs(java.lang.String mod, PyFrame frame)
public static PyObject[] importFrom(java.lang.String mod, java.lang.String[] names, PyFrame frame)
public static PyObject[] importFromAs(java.lang.String mod, java.lang.String[] names, java.lang.String[] asnames, PyFrame frame)
public static void importAll(java.lang.String mod, PyFrame frame)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |