|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.Py
public final class Py
Field Summary | |
---|---|
static PyObject |
ArithmeticError
|
static PyObject |
AssertionError
|
static PyObject |
AttributeError
|
static PyObject |
BaseException
|
static int |
COMMENT
|
static int |
DEBUG
|
static PySystemState |
defaultSystemState
|
static PyObject |
DeprecationWarning
|
static PyObject |
Ellipsis
The singleton Ellipsis Python object - written as ... when indexing |
static PyFrozenSet |
EmptyFrozenSet
A frozenset with zero elements |
static PyObject[] |
EmptyObjects
A zero-length array of PyObject's to pass to functions that expect zero-arguments |
static PyString |
EmptyString
A zero-length Python string |
static PyTuple |
EmptyTuple
A tuple with zero elements |
static PyObject |
EnvironmentError
|
static PyObject |
EOFError
|
static int |
ERROR
|
static PyObject |
Exception
|
static PyBoolean |
False
The Python boolean False |
static PyObject |
FloatingPointError
|
static PyObject |
FutureWarning
|
static PyObject |
GeneratorExit
|
static PyObject |
ImportError
|
static PyObject |
ImportWarning
|
static PyObject |
IndentationError
|
static PyObject |
IndexError
|
static PyObject |
IOError
|
static PyObject |
JavaError
|
static PyObject |
KeyboardInterrupt
|
static PyObject |
KeyError
|
static PyObject |
LookupError
|
static PyObject |
MemoryError
|
static int |
MESSAGE
|
static PyObject |
NameError
|
static PyString |
Newline
A Python string containing '\n' |
static Object |
NoConversion
A unique object to indicate no conversion is possible in __tojava__ methods |
static String[] |
NoKeywords
A zero-length array of Strings to pass to functions that don't have any keyword arguments |
static PyObject |
None
The singleton None Python object |
static PyObject |
NotImplemented
The singleton NotImplemented Python object. |
static PyObject |
NotImplementedError
|
static PyInteger |
One
The Python integer 1 |
static PyObject |
OSError
|
static PyObject |
OverflowError
|
static PyObject |
PendingDeprecationWarning
|
static PyObject |
ReferenceError
|
static PyObject |
RuntimeError
|
static PyObject |
RuntimeWarning
|
static PyString |
Space
A Python string containing ' ' |
static PyObject |
StandardError
|
static StdoutWrapper |
stderr
|
static PyObject |
StopIteration
|
static PyObject |
SyntaxError
|
static PyObject |
SyntaxWarning
|
static PyObject |
SystemError
|
static PyObject |
SystemExit
|
static PyObject |
TabError
|
static long |
TPFLAGS_BASETYPE
Set if the type allows subclassing |
static long |
TPFLAGS_HEAPTYPE
Set if the type object is dynamically allocated |
static PyBoolean |
True
The Python boolean True |
static PyObject |
TypeError
|
static PyObject |
UnboundLocalError
|
static PyObject |
UnicodeDecodeError
|
static PyObject |
UnicodeEncodeError
|
static PyObject |
UnicodeError
|
static PyObject |
UnicodeTranslateError
|
static PyObject |
UnicodeWarning
|
static PyObject |
UserWarning
|
static PyObject |
ValueError
|
static PyObject |
Warning
|
static int |
WARNING
|
static PyInteger |
Zero
The Python integer 0 |
static PyObject |
ZeroDivisionError
|
Method Summary | ||
---|---|---|
static void |
addTraceback(Throwable t,
PyFrame frame)
|
|
static void |
assert_(PyObject test)
|
|
static void |
assert_(PyObject test,
PyObject message)
|
|
static PyException |
AssertionError(String message)
|
|
static PyException |
AttributeError(String message)
|
|
static PyObject |
compile_command_flags(String string,
String filename,
CompileMode kind,
CompilerFlags cflags,
boolean stdprompt)
|
|
static PyCode |
compile_flags(InputStream istream,
String filename,
CompileMode kind,
CompilerFlags cflags)
Compiles python source code coming from a file or another external stream |
|
static PyCode |
compile_flags(org.python.antlr.base.mod node,
String filename,
CompileMode kind,
CompilerFlags cflags)
|
|
static PyCode |
compile_flags(org.python.antlr.base.mod node,
String name,
String filename,
boolean linenumbers,
boolean printResults,
CompilerFlags cflags)
Entry point for compiling modules. |
|
static PyCode |
compile_flags(String data,
String filename,
CompileMode kind,
CompilerFlags cflags)
Compiles python source code coming from String (raw bytes) data. |
|
static PyCode |
compile(InputStream istream,
String filename,
CompileMode kind)
|
|
static void |
DeprecationWarning(String message)
|
|
static void |
displayException(PyObject type,
PyObject value,
PyObject tb,
PyObject file)
|
|
static PyException |
EnvironmentError(String message)
|
|
static PyException |
EOFError(String message)
|
|
static void |
exec(PyObject o,
PyObject globals,
PyObject locals)
|
|
static Class<?> |
findClass(String name)
Tries to find a Java class. |
|
static Class<?> |
findClassEx(String name,
String reason)
Tries to find a Java class. |
|
static PyException |
FloatingPointError(String message)
|
|
static void |
flushLine()
|
|
static String |
formatException(PyObject type,
PyObject value)
|
|
static void |
FutureWarning(String message)
|
|
static PyException |
GeneratorExit(String message)
|
|
static ExtensiblePyObjectAdapter |
getAdapter()
|
|
static CompilerFlags |
getCompilerFlags()
|
|
static CompilerFlags |
getCompilerFlags(CompilerFlags flags,
boolean dont_inherit)
|
|
static CompilerFlags |
getCompilerFlags(int flags,
boolean dont_inherit)
|
|
static PyFrame |
getFrame()
|
|
static String |
getName()
|
|
static PySystemState |
getSystemState()
|
|
static ThreadState |
getThreadState()
|
|
static ThreadState |
getThreadState(PySystemState newSystemState)
|
|
static long |
id(PyObject o)
|
|
static String |
idstr(PyObject o)
|
|
static PyException |
ImportError(String message)
|
|
static void |
ImportWarning(String message)
|
|
static PyException |
IndexError(String message)
|
|
static void |
initProxy(PyProxy proxy,
String module,
String pyclass,
Object[] args)
|
|
static boolean |
initPython()
|
|
static PyException |
IOError(com.kenai.constantine.Constant errno)
|
|
static PyException |
IOError(com.kenai.constantine.Constant errno,
PyObject filename)
|
|
static PyException |
IOError(com.kenai.constantine.Constant errno,
String filename)
Deprecated. As of Jython 2.5.3, use IOError(Constant, PyObject) instead. |
|
static PyException |
IOError(IOException ioe)
|
|
static PyException |
IOError(String message)
|
|
static boolean |
isInstance(PyObject inst,
PyObject cls)
|
|
static boolean |
isSubClass(PyObject derived,
PyObject cls)
|
|
static PyObject |
iter(PyObject seq,
String message)
|
|
static long |
java_obj_id(Object o)
|
|
static PyObject |
java2py(Object o)
Uses the PyObjectAdapter passed to PySystemState.initialize() to turn o into a PyObject. |
|
static PyException |
JavaError(Throwable t)
|
|
static PyObject[] |
javas2pys(Object... objects)
Uses the PyObjectAdapter passed to PySystemState.initialize() to turn
objects into an array of PyObjects. |
|
static PyException |
KeyError(PyObject key)
|
|
static PyException |
KeyError(String message)
|
|
static PyString |
makeCharacter(char c)
|
|
static PyString |
makeCharacter(Character o)
|
|
static PyObject |
makeClass(String name,
PyObject[] bases,
PyCode code)
|
|
static PyObject |
makeClass(String name,
PyObject[] bases,
PyCode code,
PyObject[] closure_cells)
|
|
static PyObject |
makeClass(String name,
PyObject[] bases,
PyObject dict)
Create a new Python class. |
|
static PyObject |
makeClass(String name,
PyObject base,
PyObject dict)
|
|
static PyException |
makeException()
|
|
static PyException |
makeException(PyObject type)
|
|
static PyException |
makeException(PyObject type,
PyObject value)
|
|
static PyException |
makeException(PyObject type,
PyObject value,
PyObject traceback)
|
|
static boolean |
matchException(PyException pye,
PyObject exc)
Deprecated. As of Jython 2.5, use PyException.match(org.python.core.PyObject) instead. |
|
static void |
maybeWrite(String type,
String msg,
int level)
|
|
static void |
memory_error(OutOfMemoryError t)
|
|
static PyException |
MemoryError(String message)
|
|
static PyException |
NameError(String message)
|
|
static PyBoolean |
newBoolean(boolean t)
|
|
static PyCode |
newCode(int argcount,
String[] varnames,
String filename,
String name,
boolean args,
boolean keywords,
PyFunctionTable funcs,
int func_id)
|
|
static PyCode |
newCode(int argcount,
String[] varnames,
String filename,
String name,
boolean args,
boolean keywords,
PyFunctionTable funcs,
int func_id,
String[] cellvars,
String[] freevars,
int npurecell,
int moreflags)
|
|
static PyCode |
newCode(int argcount,
String[] varnames,
String filename,
String name,
int firstlineno,
boolean args,
boolean keywords,
PyFunctionTable funcs,
int func_id)
|
|
static PyCode |
newCode(int argcount,
String[] varnames,
String filename,
String name,
int firstlineno,
boolean args,
boolean keywords,
PyFunctionTable funcs,
int func_id,
String[] cellvars,
String[] freevars,
int npurecell,
int moreflags)
|
|
static PyObject |
newDate(Date date)
|
|
static PyObject |
newDatetime(Timestamp timestamp)
|
|
static PyObject |
newDecimal(String decimal)
|
|
static PyFloat |
newFloat(double v)
|
|
static PyFloat |
newFloat(float v)
|
|
static PyComplex |
newImaginary(double v)
|
|
static PyInteger |
newInteger(int i)
|
|
static PyObject |
newInteger(long i)
|
|
static PyCode |
newJavaCode(Class<?> cls,
String name)
|
|
static PyObject |
newJavaFunc(Class<?> cls,
String name)
|
|
static PyLong |
newLong(BigInteger i)
|
|
static PyLong |
newLong(int i)
|
|
static PyLong |
newLong(long l)
|
|
static PyLong |
newLong(String s)
|
|
static PyString |
newString(char c)
|
|
static PyString |
newString(String s)
|
|
static PyStringMap |
newStringMap()
|
|
static PyObject |
newTime(Time time)
|
|
static PyUnicode |
newUnicode(char c)
|
|
static PyUnicode |
newUnicode(String s)
|
|
static PyUnicode |
newUnicode(String s,
boolean isBasic)
|
|
static PyException |
NotImplementedError(String message)
|
|
static PyException |
OSError(com.kenai.constantine.Constant errno)
|
|
static PyException |
OSError(com.kenai.constantine.Constant errno,
PyObject filename)
|
|
static PyException |
OSError(com.kenai.constantine.Constant errno,
String filename)
Deprecated. As of Jython 2.5.3, use #OSerror(Constant, PyObject) instead. |
|
static PyException |
OSError(IOException ioe)
|
|
static PyException |
OSError(String message)
|
|
static PyException |
OverflowError(String message)
|
|
static void |
PendingDeprecationWarning(String message)
|
|
static void |
print(PyObject o)
|
|
static void |
print(PyObject file,
PyObject o)
|
|
static void |
printComma(PyObject o)
|
|
static void |
printComma(PyObject file,
PyObject o)
|
|
static void |
printException(Throwable t)
|
|
static void |
printException(Throwable t,
PyFrame f)
|
|
static void |
printException(Throwable t,
PyFrame f,
PyObject file)
|
|
static void |
println()
|
|
static void |
println(PyObject o)
|
|
static void |
println(PyObject file,
PyObject o)
|
|
static void |
printlnv(PyObject file)
|
|
static void |
printResult(PyObject ret)
|
|
static boolean |
py2boolean(PyObject o)
|
|
static byte |
py2byte(PyObject o)
|
|
static char |
py2char(PyObject o)
|
|
static char |
py2char(PyObject o,
String msg)
|
|
static double |
py2double(PyObject o)
|
|
static float |
py2float(PyObject o)
|
|
static int |
py2int(PyObject o)
|
|
static int |
py2int(PyObject o,
String msg)
|
|
static long |
py2long(PyObject o)
|
|
static short |
py2short(PyObject o)
|
|
static void |
py2void(PyObject o)
|
|
static PyException |
ReferenceError(String message)
|
|
static PyObject |
runCode(PyCode code,
PyObject locals,
PyObject globals)
|
|
static void |
runMain(CodeBootstrap main,
String[] args)
Initializes a default PythonInterpreter and runs the code loaded from the CodeBootstrap as __main__ Called by the code generated in
Module.addMain() |
|
static void |
runMain(PyRunnable main,
String[] args)
Initializes a default PythonInterpreter and runs the code from PyRunnable.getMain() as __main__
Called by the code generated in Module.addMain() |
|
static PyException |
RuntimeError(String message)
|
|
static void |
RuntimeWarning(String message)
|
|
static void |
saveClassFile(String name,
ByteArrayOutputStream bytestream)
|
|
static PyException |
setException(Throwable t,
PyFrame frame)
|
|
static void |
setFrame(PyFrame f)
|
|
static PySystemState |
setSystemState(PySystemState newSystemState)
|
|
static PyException |
StopIteration(String message)
|
|
static PyException |
SyntaxError(String message)
|
|
static void |
SyntaxWarning(String message)
|
|
static PyException |
SystemError(String message)
|
|
static
|
tojava(PyObject o,
Class<T> c)
Convert a given PyObject to an instance of a Java class. |
|
static Object |
tojava(PyObject o,
String s)
|
|
static PyException |
TypeError(String message)
|
|
static PyException |
UnboundLocalError(String message)
|
|
static PyException |
UnicodeDecodeError(String encoding,
String object,
int start,
int end,
String reason)
|
|
static PyException |
UnicodeEncodeError(String encoding,
String object,
int start,
int end,
String reason)
|
|
static PyException |
UnicodeError(String message)
|
|
static PyException |
UnicodeTranslateError(String object,
int start,
int end,
String reason)
|
|
static void |
UnicodeWarning(String message)
|
|
static PyObject[] |
unpackSequence(PyObject obj,
int length)
|
|
static void |
UserWarning(String message)
|
|
static PyException |
ValueError(String message)
|
|
static void |
warning(PyObject category,
String message)
|
|
static void |
warning(PyObject category,
String message,
String filename,
int lineno,
String module,
PyObject registry)
|
|
static void |
Warning(String message)
|
|
static void |
writeComment(String type,
String msg)
|
|
static void |
writeDebug(String type,
String msg)
|
|
static void |
writeError(String type,
String msg)
|
|
static void |
writeMessage(String type,
String msg)
|
|
static void |
writeWarning(String type,
String msg)
|
|
static PyException |
ZeroDivisionError(String message)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static PyObject None
public static PyObject Ellipsis
public static PyObject NotImplemented
public static String[] NoKeywords
public static PyObject[] EmptyObjects
public static PyFrozenSet EmptyFrozenSet
public static PyTuple EmptyTuple
public static PyInteger Zero
public static PyInteger One
public static PyBoolean False
public static PyBoolean True
public static PyString EmptyString
public static PyString Newline
public static PyString Space
public static long TPFLAGS_HEAPTYPE
public static long TPFLAGS_BASETYPE
public static Object NoConversion
public static PyObject OSError
public static PyObject NotImplementedError
public static PyObject EnvironmentError
public static PyObject OverflowError
public static PyObject RuntimeError
public static PyObject KeyboardInterrupt
public static PyObject FloatingPointError
public static PyObject SyntaxError
public static PyObject IndentationError
public static PyObject TabError
public static PyObject AttributeError
public static PyObject IOError
public static PyObject KeyError
public static PyObject AssertionError
public static PyObject TypeError
public static PyObject ReferenceError
public static PyObject SystemError
public static PyObject IndexError
public static PyObject ZeroDivisionError
public static PyObject NameError
public static PyObject UnboundLocalError
public static PyObject SystemExit
public static PyObject StopIteration
public static PyObject GeneratorExit
public static PyObject ImportError
public static PyObject ValueError
public static PyObject UnicodeError
public static PyObject UnicodeTranslateError
public static PyObject UnicodeDecodeError
public static PyObject UnicodeEncodeError
public static PyObject EOFError
public static PyObject MemoryError
public static PyObject ArithmeticError
public static PyObject LookupError
public static PyObject StandardError
public static PyObject Exception
public static PyObject BaseException
public static PyObject Warning
public static PyObject UserWarning
public static PyObject DeprecationWarning
public static PyObject PendingDeprecationWarning
public static PyObject SyntaxWarning
public static PyObject RuntimeWarning
public static PyObject FutureWarning
public static PyObject ImportWarning
public static PyObject UnicodeWarning
public static PyObject JavaError
public static volatile PySystemState defaultSystemState
public static StdoutWrapper stderr
public static final int ERROR
public static final int WARNING
public static final int MESSAGE
public static final int COMMENT
public static final int DEBUG
Method Detail |
---|
public static PyException OSError(String message)
public static PyException OSError(IOException ioe)
public static PyException OSError(com.kenai.constantine.Constant errno)
public static PyException OSError(com.kenai.constantine.Constant errno, PyObject filename)
@Deprecated public static PyException OSError(com.kenai.constantine.Constant errno, String filename)
#OSerror(Constant, PyObject)
instead.
public static PyException NotImplementedError(String message)
public static PyException EnvironmentError(String message)
public static PyException OverflowError(String message)
public static PyException RuntimeError(String message)
public static PyException FloatingPointError(String message)
public static PyException SyntaxError(String message)
public static PyException AttributeError(String message)
public static PyException IOError(IOException ioe)
public static PyException IOError(String message)
public static PyException IOError(com.kenai.constantine.Constant errno)
public static PyException IOError(com.kenai.constantine.Constant errno, PyObject filename)
@Deprecated public static PyException IOError(com.kenai.constantine.Constant errno, String filename)
IOError(Constant, PyObject)
instead.
public static PyException KeyError(String message)
public static PyException KeyError(PyObject key)
public static PyException AssertionError(String message)
public static PyException TypeError(String message)
public static PyException ReferenceError(String message)
public static PyException SystemError(String message)
public static PyException IndexError(String message)
public static PyException ZeroDivisionError(String message)
public static PyException NameError(String message)
public static PyException UnboundLocalError(String message)
public static PyException StopIteration(String message)
public static PyException GeneratorExit(String message)
public static PyException ImportError(String message)
public static PyException ValueError(String message)
public static PyException UnicodeError(String message)
public static PyException UnicodeTranslateError(String object, int start, int end, String reason)
public static PyException UnicodeDecodeError(String encoding, String object, int start, int end, String reason)
public static PyException UnicodeEncodeError(String encoding, String object, int start, int end, String reason)
public static PyException EOFError(String message)
public static void memory_error(OutOfMemoryError t)
public static PyException MemoryError(String message)
public static void Warning(String message)
public static void UserWarning(String message)
public static void DeprecationWarning(String message)
public static void PendingDeprecationWarning(String message)
public static void SyntaxWarning(String message)
public static void RuntimeWarning(String message)
public static void FutureWarning(String message)
public static void ImportWarning(String message)
public static void UnicodeWarning(String message)
public static void warning(PyObject category, String message)
public static void warning(PyObject category, String message, String filename, int lineno, String module, PyObject registry)
public static PyException JavaError(Throwable t)
public static <T> T tojava(PyObject o, Class<T> c)
PyObject
to an instance of a Java class.
Identical to o.__tojava__(c)
except that it will
raise a TypeError
if the conversion fails.
o
- the PyObject
to convert.c
- the class to convert it to.public static Object tojava(PyObject o, String s)
public static final PyInteger newInteger(int i)
public static PyObject newInteger(long i)
public static PyLong newLong(String s)
public static PyLong newLong(BigInteger i)
public static PyLong newLong(int i)
public static PyLong newLong(long l)
public static PyComplex newImaginary(double v)
public static PyFloat newFloat(float v)
public static PyFloat newFloat(double v)
public static PyString newString(char c)
public static PyString newString(String s)
public static PyStringMap newStringMap()
public static PyUnicode newUnicode(char c)
public static PyUnicode newUnicode(String s)
public static PyUnicode newUnicode(String s, boolean isBasic)
public static PyBoolean newBoolean(boolean t)
public static PyObject newDate(Date date)
public static PyObject newTime(Time time)
public static PyObject newDatetime(Timestamp timestamp)
public static PyObject newDecimal(String decimal)
public static PyCode newCode(int argcount, String[] varnames, String filename, String name, boolean args, boolean keywords, PyFunctionTable funcs, int func_id, String[] cellvars, String[] freevars, int npurecell, int moreflags)
public static PyCode newCode(int argcount, String[] varnames, String filename, String name, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id, String[] cellvars, String[] freevars, int npurecell, int moreflags)
public static PyCode newCode(int argcount, String[] varnames, String filename, String name, boolean args, boolean keywords, PyFunctionTable funcs, int func_id)
public static PyCode newCode(int argcount, String[] varnames, String filename, String name, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id)
public static PyCode newJavaCode(Class<?> cls, String name)
public static PyObject newJavaFunc(Class<?> cls, String name)
public static boolean initPython()
public static Class<?> findClass(String name)
name
- Name of the Java class.
public static Class<?> findClassEx(String name, String reason)
findClass(String)
, it raises a JavaError
if the class was found but there were problems loading it.
name
- Name of the Java class.reason
- Reason for finding the class. Used for debugging messages.
JavaError
- wrapping LinkageErrors/IllegalArgumentExceptions
occurred when the class is found but can't be loaded.public static void initProxy(PyProxy proxy, String module, String pyclass, Object[] args)
public static void runMain(PyRunnable main, String[] args) throws Exception
PyRunnable.getMain()
as __main__
Called by the code generated in Module.addMain()
Exception
public static void runMain(CodeBootstrap main, String[] args) throws Exception
CodeBootstrap
as __main__ Called by the code generated in
Module.addMain()
Exception
public static void printException(Throwable t)
public static void printException(Throwable t, PyFrame f)
public static void printException(Throwable t, PyFrame f, PyObject file)
public static void displayException(PyObject type, PyObject value, PyObject tb, PyObject file)
public static String formatException(PyObject type, PyObject value)
public static void assert_(PyObject test, PyObject message)
public static void assert_(PyObject test)
public static void addTraceback(Throwable t, PyFrame frame)
public static PyException setException(Throwable t, PyFrame frame)
@Deprecated public static boolean matchException(PyException pye, PyObject exc)
PyException.match(org.python.core.PyObject)
instead.
public static PyException makeException(PyObject type, PyObject value, PyObject traceback)
public static PyException makeException(PyObject type, PyObject value)
public static PyException makeException(PyObject type)
public static PyException makeException()
public static PyObject runCode(PyCode code, PyObject locals, PyObject globals)
public static void exec(PyObject o, PyObject globals, PyObject locals)
public static final ThreadState getThreadState()
public static final ThreadState getThreadState(PySystemState newSystemState)
public static final PySystemState setSystemState(PySystemState newSystemState)
public static final PySystemState getSystemState()
public static PyFrame getFrame()
public static void setFrame(PyFrame f)
public static void print(PyObject file, PyObject o)
public static void printComma(PyObject file, PyObject o)
public static void println(PyObject file, PyObject o)
public static void printlnv(PyObject file)
public static void print(PyObject o)
public static void printComma(PyObject o)
public static void println(PyObject o)
public static void println()
public static void flushLine()
public static boolean py2boolean(PyObject o)
public static byte py2byte(PyObject o)
public static short py2short(PyObject o)
public static int py2int(PyObject o)
public static int py2int(PyObject o, String msg)
public static long py2long(PyObject o)
public static float py2float(PyObject o)
public static double py2double(PyObject o)
public static char py2char(PyObject o)
public static char py2char(PyObject o, String msg)
public static void py2void(PyObject o)
public static final PyString makeCharacter(Character o)
public static final PyString makeCharacter(char c)
public static PyObject java2py(Object o)
PySystemState.initialize()
to turn o into a PyObject.
- default PyObjectAdapter type
public static PyObject[] javas2pys(Object... objects)
PySystemState.initialize()
to turn
objects
into an array of PyObjects.
- default PyObjectAdapter type
public static ExtensiblePyObjectAdapter getAdapter()
public static PyObject makeClass(String name, PyObject[] bases, PyCode code)
public static PyObject makeClass(String name, PyObject[] bases, PyCode code, PyObject[] closure_cells)
public static PyObject makeClass(String name, PyObject base, PyObject dict)
public static PyObject makeClass(String name, PyObject[] bases, PyObject dict)
name
- the String name of the classbases
- an array of PyObject base classesdict
- the class's namespace, containing the class body
definition
public static String getName()
public static CompilerFlags getCompilerFlags()
public static CompilerFlags getCompilerFlags(int flags, boolean dont_inherit)
public static CompilerFlags getCompilerFlags(CompilerFlags flags, boolean dont_inherit)
public static PyCode compile(InputStream istream, String filename, CompileMode kind)
public static PyCode compile_flags(org.python.antlr.base.mod node, String name, String filename, boolean linenumbers, boolean printResults, CompilerFlags cflags)
node
- Module node, coming from the parsing processname
- Internal name for the compiled code. Typically generated by
calling getName()
.filename
- Source file namelinenumbers
- True to track source line numbers on the generated
codeprintResults
- True to call the sys.displayhook on the result of
the codecflags
- Compiler flags
public static PyCode compile_flags(org.python.antlr.base.mod node, String filename, CompileMode kind, CompilerFlags cflags)
public static PyCode compile_flags(InputStream istream, String filename, CompileMode kind, CompilerFlags cflags)
public static PyCode compile_flags(String data, String filename, CompileMode kind, CompilerFlags cflags)
public static PyObject compile_command_flags(String string, String filename, CompileMode kind, CompilerFlags cflags, boolean stdprompt)
public static PyObject[] unpackSequence(PyObject obj, int length)
public static PyObject iter(PyObject seq, String message)
public static long id(PyObject o)
public static String idstr(PyObject o)
public static long java_obj_id(Object o)
public static void printResult(PyObject ret)
public static void maybeWrite(String type, String msg, int level)
public static void writeError(String type, String msg)
public static void writeWarning(String type, String msg)
public static void writeMessage(String type, String msg)
public static void writeComment(String type, String msg)
public static void writeDebug(String type, String msg)
public static void saveClassFile(String name, ByteArrayOutputStream bytestream)
public static boolean isInstance(PyObject inst, PyObject cls)
public static boolean isSubClass(PyObject derived, PyObject cls)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |