org.python.core
public final class Py extends Object
Field Summary | |
---|---|
static PyObject | ArithmeticError |
static PyObject | AssertionError |
static PyObject | AttributeError |
static int | COMMENT |
static PySystemState | defaultSystemState |
static PyObject | DeprecationWarning |
static int | DEBUG |
static PyObject | Ellipsis The singleton Ellipsis Python object - written as ... when indexing |
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 PyObject | FloatingPointError |
static PyObject | ImportError |
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 - also used as true * |
static PyObject | OSError |
static PyObject | OverflowError |
static PyObject | OverflowWarning |
static PyObject | ReferenceError |
static PyObject | RuntimeError |
static PyObject | RuntimeWarning |
static StdoutWrapper | stderr |
static PyString | Space A Python string containing ' ' * |
static PyObject | StandardError |
static PyObject | StopIteration |
static PyObject | SyntaxError |
static PyObject | SyntaxWarning |
static PyObject | SystemError |
static PyObject | SystemExit |
static PyObject | TabError |
static PyObject | TypeError |
static PyObject | UnboundLocalError |
static PyObject | UnicodeError |
static PyObject | UserWarning |
static PyObject | ValueError |
static int | WARNING |
static PyObject | Warning |
static PyInteger | Zero The Python integer 0 - also used as false * |
static PyObject | ZeroDivisionError |
Method Summary | |
---|---|
static PyException | AssertionError(String message) |
static PyException | AttributeError(String message) |
static void | addTraceback(Throwable t, PyFrame frame) |
static void | assert_(PyObject test, PyObject message) |
static void | assert_(PyObject test) |
static PyCode | compile(modType node, String filename) |
static PyCode | compile(modType node, String name, String filename) |
static PyCode | compile(modType node, String name, String filename, boolean linenumbers, boolean printResults) |
static PyCode | compile(InputStream istream, String filename, String type) |
static PyObject | compile_command_flags(String string, String filename, String kind, CompilerFlags cflags, boolean stdprompt) |
static PyCode | compile_flags(modType node, String name, String filename, boolean linenumbers, boolean printResults, CompilerFlags cflags) |
static PyCode | compile_flags(InputStream istream, String filename, String type, CompilerFlags cflags) |
static PyCode | compile_flags(String data, String filename, String type, CompilerFlags cflags) |
static void | displayException(PyObject type, PyObject value, PyObject tb, PyObject file) |
static void | DeprecationWarning(String message) |
static void | exec(PyObject o, PyObject globals, PyObject locals) |
static PyException | EOFError(String message) |
static Class | findClass(String name) |
static Class | findClassEx(String name, String reason) |
static PyException | FloatingPointError(String message) |
static CompilerFlags | getCompilerFlags() |
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 void | initProxy(PyProxy proxy, String module, String pyclass, Object[] args, String[] packages, String[] props, boolean frozen) |
static void | initProxy(PyProxy proxy, String module, String pyclass, Object[] args, String[] packages, String[] props, String frozenPackage, String[] modules) |
static boolean | initPython() |
static void | initRunnable(String module, PyObject dict) |
static boolean | isInstance(PyObject obj, PyObject cls) |
static boolean | isSubClass(PyObject derived, PyObject cls) |
static PyObject | iter(PyObject seq, String message) |
static PyException | ImportError(String message) |
static PyException | IndexError(String message) |
static PyException | IOError(IOException ioe) |
static PyException | IOError(String message) |
static PyObject | java2py(Object o) |
static long | java_obj_id(Object o) |
static PyObject | jfindattr(PyProxy proxy, String name) |
static PyObject | jgetattr(PyProxy proxy, String name) |
static PyException | JavaError(Throwable t) |
static PyException | KeyError(String message) |
static PyObject | makeClass(String name, PyObject[] bases, PyCode code, PyObject doc) |
static PyObject | makeClass(String name, PyObject[] bases, PyCode code, PyObject doc, PyObject[] closure_cells) |
static PyObject | makeClass(String name, PyObject[] bases, PyCode code, PyObject doc, Class proxyClass) |
static PyObject | makeClass(String name, PyObject[] bases, PyCode code, PyObject doc, Class proxyClass, PyObject[] closure_cells) |
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 e) |
static void | maybeWrite(String type, String msg, int level) |
static void | memory_error(OutOfMemoryError t) |
static PyException | MemoryError(String message) |
static PyInteger | newBoolean(boolean t) |
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, String[] cellvars, String[] freevars, int npurecell, int moreflags) |
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, int firstlineno, boolean args, boolean keywords, PyFunctionTable funcs, int func_id) |
static PyFloat | newFloat(float v) |
static PyFloat | newFloat(double 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(String s) |
static PyLong | newLong(BigInteger i) |
static PyLong | newLong(int i) |
static PyString | newString(char c) |
static PyString | newString(String s) |
static PyUnicode | newUnicode(char c) |
static PyUnicode | newUnicode(String s) |
static PyException | NameError(String message) |
static PyException | OverflowError(String message) |
static void | OverflowWarning(String message) |
static void | print(PyObject file, PyObject o) |
static void | print(PyObject o) |
static void | printComma(PyObject file, PyObject o) |
static void | printComma(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(PyObject file, PyObject o) |
static void | println(PyObject o) |
static void | println() |
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 Class | relFindClass(Class home, String name) |
static PyObject | runCode(PyCode code, PyObject locals, PyObject globals) |
static void | runMain(Class mainClass, String[] args, String[] packages, String[] props, String frozenPackage, String[] modules) |
static PyException | ReferenceError(String message) |
static PyException | RuntimeError(String message) |
static void | RuntimeWarning(String message) |
static String | safeRepr(PyObject o) |
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 Object | tojava(PyObject o, Class 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 PyObject[] | unpackSequence(PyObject o, int length) |
static PyException | UnboundLocalError(String message) |
static PyException | UnicodeError(String message) |
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 | 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 void | Warning(String message) |
static PyException | ZeroDivisionError(String message) |
Deprecated:
Deprecated:
PyObject
to an instance of a Java class.
Identical to o.__tojava__(c)
except that it will
raise a TypeError
if the conversion fails.Parameters: o the PyObject
to convert. c the class to convert it to.