Package org.python.core
Class Py
- java.lang.Object
-
- org.python.core.Py
-
public final class Py extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static PyObjectArithmeticErrorstatic PyObjectAssertionErrorstatic PyObjectAttributeErrorstatic intCOMMENTstatic intDEBUGstatic PySystemStatedefaultSystemStatestatic PyObjectDeprecationWarningstatic PyObjectEllipsisThe singleton Ellipsis Python object - written as ... when indexingstatic PyObject[]EmptyObjectsA zero-length array of PyObject's to pass to functions that expect zero-argumentsstatic PyStringEmptyStringA zero-length Python stringstatic PyTupleEmptyTupleA tuple with zero elementsstatic PyObjectEnvironmentErrorstatic PyObjectEOFErrorstatic intERRORstatic PyObjectExceptionstatic PyObjectFloatingPointErrorstatic PyObjectImportErrorstatic PyObjectIndentationErrorstatic PyObjectIndexErrorstatic PyObjectIOErrorstatic PyObjectJavaErrorstatic PyObjectKeyboardInterruptstatic PyObjectKeyErrorstatic PyObjectLookupErrorstatic PyObjectMemoryErrorstatic intMESSAGEstatic PyObjectNameErrorstatic PyStringNewlineA Python string containing '\n'static java.lang.ObjectNoConversionA unique object to indicate no conversion is possible in __tojava__ methodsstatic java.lang.String[]NoKeywordsA zero-length array of Strings to pass to functions that don't have any keyword argumentsstatic PyObjectNoneThe singleton None Python objectstatic PyObjectNotImplementedThe singleton NotImplemented Python object.static PyObjectNotImplementedErrorstatic PyIntegerOneThe Python integer 1 - also used as truestatic PyObjectOSErrorstatic PyObjectOverflowErrorstatic PyObjectOverflowWarningstatic PyObjectReferenceErrorstatic PyObjectRuntimeErrorstatic PyObjectRuntimeWarningstatic PyStringSpaceA Python string containing ' 'static PyObjectStandardErrorstatic StdoutWrapperstderrstatic PyObjectStopIterationstatic PyObjectSyntaxErrorstatic PyObjectSyntaxWarningstatic PyObjectSystemErrorstatic PyObjectSystemExitstatic PyObjectTabErrorstatic PyObjectTypeErrorstatic PyObjectUnboundLocalErrorstatic PyObjectUnicodeErrorstatic PyObjectUserWarningstatic PyObjectValueErrorstatic PyObjectWarningstatic intWARNINGstatic PyIntegerZeroThe Python integer 0 - also used as falsestatic PyObjectZeroDivisionError
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddTraceback(java.lang.Throwable t, PyFrame frame)static voidassert_(PyObject test)static voidassert_(PyObject test, PyObject message)static PyExceptionAssertionError(java.lang.String message)static PyExceptionAttributeError(java.lang.String message)static PyCodecompile(java.io.InputStream istream, java.lang.String filename, java.lang.String type)static PyCodecompile(org.python.parser.ast.modType node, java.lang.String filename)static PyCodecompile(org.python.parser.ast.modType node, java.lang.String name, java.lang.String filename)static PyCodecompile(org.python.parser.ast.modType node, java.lang.String name, java.lang.String filename, boolean linenumbers, boolean printResults)static PyObjectcompile_command_flags(java.lang.String string, java.lang.String filename, java.lang.String kind, CompilerFlags cflags, boolean stdprompt)static PyCodecompile_flags(java.io.InputStream istream, java.lang.String filename, java.lang.String type, CompilerFlags cflags)static PyCodecompile_flags(java.lang.String data, java.lang.String filename, java.lang.String type, CompilerFlags cflags)static PyCodecompile_flags(org.python.parser.ast.modType node, java.lang.String name, java.lang.String filename, boolean linenumbers, boolean printResults, CompilerFlags cflags)static voidDeprecationWarning(java.lang.String message)static voiddisplayException(PyObject type, PyObject value, PyObject tb, PyObject file)static PyExceptionEOFError(java.lang.String message)static voidexec(PyObject o, PyObject globals, PyObject locals)static java.lang.ClassfindClass(java.lang.String name)static java.lang.ClassfindClassEx(java.lang.String name, java.lang.String reason)static PyExceptionFloatingPointError(java.lang.String message)static org.python.core.adapter.ExtensiblePyObjectAdaptergetAdapter()static CompilerFlagsgetCompilerFlags()static CompilerFlagsgetCompilerFlags(int flags, boolean dont_inherit)static PyFramegetFrame()static java.lang.StringgetName()static PySystemStategetSystemState()static ThreadStategetThreadState()static ThreadStategetThreadState(PySystemState newSystemState)static longid(PyObject o)static java.lang.Stringidstr(PyObject o)static PyExceptionImportError(java.lang.String message)static PyExceptionIndexError(java.lang.String message)static voidinitProxy(PyProxy proxy, java.lang.String module, java.lang.String pyclass, java.lang.Object[] args, java.lang.String[] packages, java.lang.String[] props, boolean frozen)static voidinitProxy(PyProxy proxy, java.lang.String module, java.lang.String pyclass, java.lang.Object[] args, java.lang.String[] packages, java.lang.String[] props, java.lang.String frozenPackage, java.lang.String[] modules)static booleaninitPython()static voidinitRunnable(java.lang.String module, PyObject dict)static PyExceptionIOError(java.io.IOException ioe)static PyExceptionIOError(java.lang.String message)static booleanisInstance(PyObject obj, PyObject cls)static booleanisSubClass(PyObject derived, PyObject cls)static PyObjectiter(PyObject seq, java.lang.String message)static longjava_obj_id(java.lang.Object o)static PyObjectjava2py(java.lang.Object o)Uses the PyObjectAdapter passed toPySystemState.initialize()to turn o into a PyObject.static PyExceptionJavaError(java.lang.Throwable t)static PyObjectjfindattr(PyProxy proxy, java.lang.String name)Deprecated.*static PyObjectjgetattr(PyProxy proxy, java.lang.String name)Deprecated.*static PyExceptionKeyError(java.lang.String message)static PyStringmakeCharacter(java.lang.Character o)static PyObjectmakeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc)static PyObjectmakeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc, java.lang.Class proxyClass)static PyObjectmakeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc, java.lang.Class proxyClass, PyObject[] closure_cells)static PyObjectmakeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc, PyObject[] closure_cells)static PyExceptionmakeException()static PyExceptionmakeException(PyObject type)static PyExceptionmakeException(PyObject type, PyObject value)static PyExceptionmakeException(PyObject type, PyObject value, PyObject traceback)static booleanmatchException(PyException pye, PyObject e)static voidmaybeWrite(java.lang.String type, java.lang.String msg, int level)static voidmemory_error(java.lang.OutOfMemoryError t)static PyExceptionMemoryError(java.lang.String message)static PyExceptionNameError(java.lang.String message)static PyIntegernewBoolean(boolean t)static PyCodenewCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, boolean args, boolean keywords, PyFunctionTable funcs, int func_id)static PyCodenewCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, boolean args, boolean keywords, PyFunctionTable funcs, int func_id, java.lang.String[] cellvars, java.lang.String[] freevars, int npurecell, int moreflags)static PyCodenewCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id)static PyCodenewCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id, java.lang.String[] cellvars, java.lang.String[] freevars, int npurecell, int moreflags)static PyFloatnewFloat(double v)static PyFloatnewFloat(float v)static PyComplexnewImaginary(double v)static PyIntegernewInteger(int i)static PyObjectnewInteger(long i)static PyCodenewJavaCode(java.lang.Class cls, java.lang.String name)static PyObjectnewJavaFunc(java.lang.Class cls, java.lang.String name)static PyLongnewLong(int i)static PyLongnewLong(java.lang.String s)static PyLongnewLong(java.math.BigInteger i)static PyStringnewString(char c)static PyStringnewString(java.lang.String s)static PyUnicodenewUnicode(char c)static PyUnicodenewUnicode(java.lang.String s)static PyExceptionOverflowError(java.lang.String message)static voidOverflowWarning(java.lang.String message)static voidprint(PyObject o)static voidprint(PyObject file, PyObject o)static voidprintComma(PyObject o)static voidprintComma(PyObject file, PyObject o)static voidprintException(java.lang.Throwable t)static voidprintException(java.lang.Throwable t, PyFrame f)static voidprintException(java.lang.Throwable t, PyFrame f, PyObject file)static voidprintln()static voidprintln(PyObject o)static voidprintln(PyObject file, PyObject o)static voidprintlnv(PyObject file)static voidprintResult(PyObject ret)static booleanpy2boolean(PyObject o)static bytepy2byte(PyObject o)static charpy2char(PyObject o)static charpy2char(PyObject o, java.lang.String msg)static doublepy2double(PyObject o)static floatpy2float(PyObject o)static intpy2int(PyObject o)static intpy2int(PyObject o, java.lang.String msg)static longpy2long(PyObject o)static shortpy2short(PyObject o)static voidpy2void(PyObject o)static PyExceptionReferenceError(java.lang.String message)static java.lang.ClassrelFindClass(java.lang.Class home, java.lang.String name)static PyObjectrunCode(PyCode code, PyObject locals, PyObject globals)static voidrunMain(java.lang.Class mainClass, java.lang.String[] args, java.lang.String[] packages, java.lang.String[] props, java.lang.String frozenPackage, java.lang.String[] modules)static voidrunMain(PyRunnable main, java.lang.String[] args)Initializes a default PythonInterpreter and runs the code fromPyRunnable.getMain()as __main__ Called by the code generated inModule.addMain()static PyExceptionRuntimeError(java.lang.String message)static voidRuntimeWarning(java.lang.String message)static java.lang.StringsafeRepr(PyObject o)static voidsaveClassFile(java.lang.String name, java.io.ByteArrayOutputStream bytestream)static PyExceptionsetException(java.lang.Throwable t, PyFrame frame)static voidsetFrame(PyFrame f)static PySystemStatesetSystemState(PySystemState newSystemState)static PyExceptionStopIteration(java.lang.String message)static PyExceptionSyntaxError(java.lang.String message)static voidSyntaxWarning(java.lang.String message)static PyExceptionSystemError(java.lang.String message)static java.lang.Objecttojava(PyObject o, java.lang.Class c)Deprecated.static java.lang.Objecttojava(PyObject o, java.lang.String s)static PyExceptionTypeError(java.lang.String message)static PyExceptionUnboundLocalError(java.lang.String message)static PyExceptionUnicodeError(java.lang.String message)static PyObject[]unpackSequence(PyObject o, int length)static voidUserWarning(java.lang.String message)static PyExceptionValueError(java.lang.String message)static voidwarning(PyObject category, java.lang.String message)static voidwarning(PyObject category, java.lang.String message, java.lang.String filename, int lineno, java.lang.String module, PyObject registry)static voidWarning(java.lang.String message)static voidwriteComment(java.lang.String type, java.lang.String msg)static voidwriteDebug(java.lang.String type, java.lang.String msg)static voidwriteError(java.lang.String type, java.lang.String msg)static voidwriteMessage(java.lang.String type, java.lang.String msg)static voidwriteWarning(java.lang.String type, java.lang.String msg)static PyExceptionZeroDivisionError(java.lang.String message)
-
-
-
Field Detail
-
None
public static PyObject None
The singleton None Python object
-
Ellipsis
public static PyObject Ellipsis
The singleton Ellipsis Python object - written as ... when indexing
-
NotImplemented
public static PyObject NotImplemented
The singleton NotImplemented Python object. Used in rich comparison
-
NoKeywords
public static java.lang.String[] NoKeywords
A zero-length array of Strings to pass to functions that don't have any keyword arguments
-
EmptyObjects
public static PyObject[] EmptyObjects
A zero-length array of PyObject's to pass to functions that expect zero-arguments
-
EmptyTuple
public static PyTuple EmptyTuple
A tuple with zero elements
-
Zero
public static PyInteger Zero
The Python integer 0 - also used as false
-
One
public static PyInteger One
The Python integer 1 - also used as true
-
EmptyString
public static PyString EmptyString
A zero-length Python string
-
Newline
public static PyString Newline
A Python string containing '\n'
-
Space
public static PyString Space
A Python string containing ' '
-
NoConversion
public static java.lang.Object NoConversion
A unique object to indicate no conversion is possible in __tojava__ methods
-
OSError
public static PyObject OSError
-
NotImplementedError
public static PyObject NotImplementedError
-
EnvironmentError
public static PyObject EnvironmentError
-
OverflowError
public static PyObject OverflowError
-
RuntimeError
public static PyObject RuntimeError
-
KeyboardInterrupt
public static PyObject KeyboardInterrupt
-
FloatingPointError
public static PyObject FloatingPointError
-
SyntaxError
public static PyObject SyntaxError
-
IndentationError
public static PyObject IndentationError
-
TabError
public static PyObject TabError
-
AttributeError
public static PyObject AttributeError
-
IOError
public static PyObject IOError
-
KeyError
public static PyObject KeyError
-
AssertionError
public static PyObject AssertionError
-
TypeError
public static PyObject TypeError
-
ReferenceError
public static PyObject ReferenceError
-
SystemError
public static PyObject SystemError
-
IndexError
public static PyObject IndexError
-
ZeroDivisionError
public static PyObject ZeroDivisionError
-
NameError
public static PyObject NameError
-
UnboundLocalError
public static PyObject UnboundLocalError
-
SystemExit
public static PyObject SystemExit
-
StopIteration
public static PyObject StopIteration
-
ImportError
public static PyObject ImportError
-
ValueError
public static PyObject ValueError
-
UnicodeError
public static PyObject UnicodeError
-
EOFError
public static PyObject EOFError
-
MemoryError
public static PyObject MemoryError
-
ArithmeticError
public static PyObject ArithmeticError
-
LookupError
public static PyObject LookupError
-
StandardError
public static PyObject StandardError
-
Exception
public static PyObject Exception
-
Warning
public static PyObject Warning
-
UserWarning
public static PyObject UserWarning
-
DeprecationWarning
public static PyObject DeprecationWarning
-
SyntaxWarning
public static PyObject SyntaxWarning
-
OverflowWarning
public static PyObject OverflowWarning
-
RuntimeWarning
public static PyObject RuntimeWarning
-
JavaError
public static PyObject JavaError
-
defaultSystemState
public static PySystemState defaultSystemState
-
stderr
public static StdoutWrapper stderr
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
- See Also:
- Constant Field Values
-
MESSAGE
public static final int MESSAGE
- See Also:
- Constant Field Values
-
COMMENT
public static final int COMMENT
- See Also:
- Constant Field Values
-
DEBUG
public static final int DEBUG
- See Also:
- Constant Field Values
-
-
Method Detail
-
OverflowError
public static PyException OverflowError(java.lang.String message)
-
RuntimeError
public static PyException RuntimeError(java.lang.String message)
-
FloatingPointError
public static PyException FloatingPointError(java.lang.String message)
-
SyntaxError
public static PyException SyntaxError(java.lang.String message)
-
AttributeError
public static PyException AttributeError(java.lang.String message)
-
IOError
public static PyException IOError(java.io.IOException ioe)
-
IOError
public static PyException IOError(java.lang.String message)
-
KeyError
public static PyException KeyError(java.lang.String message)
-
AssertionError
public static PyException AssertionError(java.lang.String message)
-
TypeError
public static PyException TypeError(java.lang.String message)
-
ReferenceError
public static PyException ReferenceError(java.lang.String message)
-
SystemError
public static PyException SystemError(java.lang.String message)
-
IndexError
public static PyException IndexError(java.lang.String message)
-
ZeroDivisionError
public static PyException ZeroDivisionError(java.lang.String message)
-
NameError
public static PyException NameError(java.lang.String message)
-
UnboundLocalError
public static PyException UnboundLocalError(java.lang.String message)
-
StopIteration
public static PyException StopIteration(java.lang.String message)
-
ImportError
public static PyException ImportError(java.lang.String message)
-
ValueError
public static PyException ValueError(java.lang.String message)
-
UnicodeError
public static PyException UnicodeError(java.lang.String message)
-
EOFError
public static PyException EOFError(java.lang.String message)
-
memory_error
public static void memory_error(java.lang.OutOfMemoryError t)
-
MemoryError
public static PyException MemoryError(java.lang.String message)
-
Warning
public static void Warning(java.lang.String message)
-
UserWarning
public static void UserWarning(java.lang.String message)
-
DeprecationWarning
public static void DeprecationWarning(java.lang.String message)
-
SyntaxWarning
public static void SyntaxWarning(java.lang.String message)
-
OverflowWarning
public static void OverflowWarning(java.lang.String message)
-
RuntimeWarning
public static void RuntimeWarning(java.lang.String message)
-
warning
public static void warning(PyObject category, java.lang.String message)
-
warning
public static void warning(PyObject category, java.lang.String message, java.lang.String filename, int lineno, java.lang.String module, PyObject registry)
-
JavaError
public static PyException JavaError(java.lang.Throwable t)
-
tojava
public static java.lang.Object tojava(PyObject o, java.lang.Class c)
Deprecated.Convert a givenPyObjectto an instance of a Java class. Identical too.__tojava__(c)except that it will raise aTypeErrorif the conversion fails.- Parameters:
o- thePyObjectto convert.c- the class to convert it to.
-
tojava
public static java.lang.Object tojava(PyObject o, java.lang.String s)
-
newInteger
public static final PyInteger newInteger(int i)
-
newInteger
public static PyObject newInteger(long i)
-
newLong
public static PyLong newLong(java.lang.String s)
-
newLong
public static PyLong newLong(java.math.BigInteger i)
-
newLong
public static PyLong newLong(int i)
-
newImaginary
public static PyComplex newImaginary(double v)
-
newFloat
public static PyFloat newFloat(float v)
-
newFloat
public static PyFloat newFloat(double v)
-
newString
public static PyString newString(char c)
-
newString
public static PyString newString(java.lang.String s)
-
newUnicode
public static PyUnicode newUnicode(char c)
-
newUnicode
public static PyUnicode newUnicode(java.lang.String s)
-
newBoolean
public static PyInteger newBoolean(boolean t)
-
newCode
public static PyCode newCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, boolean args, boolean keywords, PyFunctionTable funcs, int func_id, java.lang.String[] cellvars, java.lang.String[] freevars, int npurecell, int moreflags)
-
newCode
public static PyCode newCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id, java.lang.String[] cellvars, java.lang.String[] freevars, int npurecell, int moreflags)
-
newCode
public static PyCode newCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, boolean args, boolean keywords, PyFunctionTable funcs, int func_id)
-
newCode
public static PyCode newCode(int argcount, java.lang.String[] varnames, java.lang.String filename, java.lang.String name, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id)
-
newJavaCode
public static PyCode newJavaCode(java.lang.Class cls, java.lang.String name)
-
newJavaFunc
public static PyObject newJavaFunc(java.lang.Class cls, java.lang.String name)
-
initPython
public static boolean initPython()
-
relFindClass
public static java.lang.Class relFindClass(java.lang.Class home, java.lang.String name)
-
findClass
public static java.lang.Class findClass(java.lang.String name)
-
findClassEx
public static java.lang.Class findClassEx(java.lang.String name, java.lang.String reason)
-
initProxy
public static void initProxy(PyProxy proxy, java.lang.String module, java.lang.String pyclass, java.lang.Object[] args, java.lang.String[] packages, java.lang.String[] props, boolean frozen)
-
initProxy
public static void initProxy(PyProxy proxy, java.lang.String module, java.lang.String pyclass, java.lang.Object[] args, java.lang.String[] packages, java.lang.String[] props, java.lang.String frozenPackage, java.lang.String[] modules)
-
initRunnable
public static void initRunnable(java.lang.String module, PyObject dict)
-
runMain
public static void runMain(PyRunnable main, java.lang.String[] args) throws java.lang.Exception
Initializes a default PythonInterpreter and runs the code fromPyRunnable.getMain()as __main__ Called by the code generated inModule.addMain()- Throws:
java.lang.Exception
-
runMain
public static void runMain(java.lang.Class mainClass, java.lang.String[] args, java.lang.String[] packages, java.lang.String[] props, java.lang.String frozenPackage, java.lang.String[] modules) throws java.lang.Exception- Throws:
java.lang.Exception
-
printException
public static void printException(java.lang.Throwable t)
-
printException
public static void printException(java.lang.Throwable t, PyFrame f)
-
displayException
public static void displayException(PyObject type, PyObject value, PyObject tb, PyObject file)
-
assert_
public static void assert_(PyObject test)
-
addTraceback
public static void addTraceback(java.lang.Throwable t, PyFrame frame)
-
setException
public static PyException setException(java.lang.Throwable t, PyFrame frame)
-
matchException
public static boolean matchException(PyException pye, PyObject e)
-
makeException
public static PyException makeException()
-
makeException
public static PyException makeException(PyObject type)
-
makeException
public static PyException makeException(PyObject type, PyObject value)
-
makeException
public static PyException makeException(PyObject type, PyObject value, PyObject traceback)
-
getThreadState
public static final ThreadState getThreadState()
-
getThreadState
public static final ThreadState getThreadState(PySystemState newSystemState)
-
setSystemState
public static final PySystemState setSystemState(PySystemState newSystemState)
-
getSystemState
public static final PySystemState getSystemState()
-
getFrame
public static PyFrame getFrame()
-
setFrame
public static void setFrame(PyFrame f)
-
printlnv
public static void printlnv(PyObject file)
-
print
public static void print(PyObject o)
-
printComma
public static void printComma(PyObject o)
-
println
public static void println(PyObject o)
-
println
public static void println()
-
py2boolean
public static boolean py2boolean(PyObject o)
-
py2byte
public static byte py2byte(PyObject o)
-
py2short
public static short py2short(PyObject o)
-
py2int
public static int py2int(PyObject o)
-
py2int
public static int py2int(PyObject o, java.lang.String msg)
-
py2long
public static long py2long(PyObject o)
-
py2float
public static float py2float(PyObject o)
-
py2double
public static double py2double(PyObject o)
-
py2char
public static char py2char(PyObject o)
-
py2char
public static char py2char(PyObject o, java.lang.String msg)
-
py2void
public static void py2void(PyObject o)
-
makeCharacter
public static final PyString makeCharacter(java.lang.Character o)
-
java2py
public static PyObject java2py(java.lang.Object o)
Uses the PyObjectAdapter passed toPySystemState.initialize()to turn o into a PyObject.- See Also:
- default PyObjectAdapter type
-
getAdapter
public static org.python.core.adapter.ExtensiblePyObjectAdapter getAdapter()
- Returns:
- the ExtensiblePyObjectAdapter used by java2py.
-
makeClass
public static PyObject makeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc)
-
makeClass
public static PyObject makeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc, PyObject[] closure_cells)
-
makeClass
public static PyObject makeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc, java.lang.Class proxyClass)
-
makeClass
public static PyObject makeClass(java.lang.String name, PyObject[] bases, PyCode code, PyObject doc, java.lang.Class proxyClass, PyObject[] closure_cells)
-
getName
public static java.lang.String getName()
-
getCompilerFlags
public static CompilerFlags getCompilerFlags()
-
getCompilerFlags
public static CompilerFlags getCompilerFlags(int flags, boolean dont_inherit)
-
compile
public static PyCode compile(org.python.parser.ast.modType node, java.lang.String filename)
-
compile
public static PyCode compile(org.python.parser.ast.modType node, java.lang.String name, java.lang.String filename)
-
compile
public static PyCode compile(org.python.parser.ast.modType node, java.lang.String name, java.lang.String filename, boolean linenumbers, boolean printResults)
-
compile
public static PyCode compile(java.io.InputStream istream, java.lang.String filename, java.lang.String type)
-
compile_flags
public static PyCode compile_flags(org.python.parser.ast.modType node, java.lang.String name, java.lang.String filename, boolean linenumbers, boolean printResults, CompilerFlags cflags)
-
compile_flags
public static PyCode compile_flags(java.io.InputStream istream, java.lang.String filename, java.lang.String type, CompilerFlags cflags)
-
compile_flags
public static PyCode compile_flags(java.lang.String data, java.lang.String filename, java.lang.String type, CompilerFlags cflags)
-
compile_command_flags
public static PyObject compile_command_flags(java.lang.String string, java.lang.String filename, java.lang.String kind, CompilerFlags cflags, boolean stdprompt)
-
id
public static long id(PyObject o)
-
idstr
public static java.lang.String idstr(PyObject o)
-
java_obj_id
public static long java_obj_id(java.lang.Object o)
-
safeRepr
public static java.lang.String safeRepr(PyObject o)
-
printResult
public static void printResult(PyObject ret)
-
maybeWrite
public static void maybeWrite(java.lang.String type, java.lang.String msg, int level)
-
writeError
public static void writeError(java.lang.String type, java.lang.String msg)
-
writeWarning
public static void writeWarning(java.lang.String type, java.lang.String msg)
-
writeMessage
public static void writeMessage(java.lang.String type, java.lang.String msg)
-
writeComment
public static void writeComment(java.lang.String type, java.lang.String msg)
-
writeDebug
public static void writeDebug(java.lang.String type, java.lang.String msg)
-
saveClassFile
public static void saveClassFile(java.lang.String name, java.io.ByteArrayOutputStream bytestream)
-
-