Class _jyio

java.lang.Object
org.python.modules._io._jyio
All Implemented Interfaces:
ClassDictInit

public class _jyio extends Object implements ClassDictInit
The Python _io module implemented in Java.
  • Field Details

    • UnsupportedOperation

      public static PyType UnsupportedOperation
      A Python class for the UnsupportedOperation exception.
    • DEFAULT_BUFFER_SIZE

      public static final PyInteger DEFAULT_BUFFER_SIZE
      Default buffer size for export.
    • __doc__

      public static final String __doc__
      See Also:
    • __doc__open

      public static final String __doc__open
      See Also:
  • Constructor Details

    • _jyio

      public _jyio()
  • Method Details

    • classDictInit

      public static void classDictInit(PyObject dict)
      This method is called when the module is loaded, to populate the namespace (dictionary) of the module. The dictionary has been initialised at this point reflectively from the methods of this class and this method nulls those entries that ought not to be exposed.
      Parameters:
      dict - namespace of the module
    • UnsupportedOperation

      public static PyException UnsupportedOperation(String message)
      A function that returns a PyException, which is a Java exception suitable for throwing, and that will be raised as an UnsupportedOperation Python exception.
      Parameters:
      message - text message parameter to the Python exception
      Returns:
      nascent UnsupportedOperation Python exception
    • open

      public static PyObject open(PyObject[] args, String[] kwds)
      Open file and return a stream. Raise IOError upon failure. This is a port to Java of the CPython _io.open (Modules/_io/_iomodule.c) following the same logic, but expressed with the benefits of Java syntax.
      Parameters:
      args - array of arguments from Python call via Jython framework
      kwds - array of keywords from Python call via Jython framework
      Returns:
      the stream object