uio - Input/Output Streams
uio
contains additional types of stream (file-like) objects and helper functions. This feature implements a subset of the corresponding CPython feature, as described below. For more information, refer to the original CPython documentation:
io
.
Support IOBase, BytesIO, FileIO, StringIO, TextIO.
Example
fd = uio.open('/usr/test.py', mode='r', encoding='UTF-8')
fd.close()
Open File
uio.open
uio.open(name, mode='r', **kwarg)
Opens a file. This is an alias for the built-in
open()
function.
Parameter
-
name: String type. File name. -
mode: String type. Open mode.
-
**kwarg: Variable-length parameter list.
Return Value
uio object – Successful execution
Error – Failed execution
Close File
uio.close
uio.close()
Closes the open files.
