Package org.python.modules._io
Class _jyio
java.lang.Object
org.python.modules._io._jyio
- All Implemented Interfaces:
ClassDictInit
The Python _io module implemented in Java.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
classDictInit
(PyObject dict) This method is called when the module is loaded, to populate the namespace (dictionary) of the module.static PyObject
Open file and return a stream.static PyException
UnsupportedOperation
(String message) A function that returns aPyException
, which is a Java exception suitable for throwing, and that will be raised as anUnsupportedOperation
Python exception.
-
Field Details
-
UnsupportedOperation
A Python class for theUnsupportedOperation
exception. -
DEFAULT_BUFFER_SIZE
Default buffer size for export. -
__doc__
- See Also:
-
__doc__open
- See Also:
-
-
Constructor Details
-
_jyio
public _jyio()
-
-
Method Details
-
classDictInit
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
A function that returns aPyException
, which is a Java exception suitable for throwing, and that will be raised as anUnsupportedOperation
Python exception.- Parameters:
message
- text message parameter to the Python exception- Returns:
- nascent
UnsupportedOperation
Python exception
-
open
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 frameworkkwds
- array of keywords from Python call via Jython framework- Returns:
- the stream object
-