Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python2....
File: io.py
"""The io module provides the Python interfaces to stream handling. The
[0] Fix | Delete
builtin open function is defined in this module.
[1] Fix | Delete
[2] Fix | Delete
At the top of the I/O hierarchy is the abstract base class IOBase. It
[3] Fix | Delete
defines the basic interface to a stream. Note, however, that there is no
[4] Fix | Delete
separation between reading and writing to streams; implementations are
[5] Fix | Delete
allowed to raise an IOError if they do not support a given operation.
[6] Fix | Delete
[7] Fix | Delete
Extending IOBase is RawIOBase which deals simply with the reading and
[8] Fix | Delete
writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide
[9] Fix | Delete
an interface to OS files.
[10] Fix | Delete
[11] Fix | Delete
BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its
[12] Fix | Delete
subclasses, BufferedWriter, BufferedReader, and BufferedRWPair buffer
[13] Fix | Delete
streams that are readable, writable, and both respectively.
[14] Fix | Delete
BufferedRandom provides a buffered interface to random access
[15] Fix | Delete
streams. BytesIO is a simple stream of in-memory bytes.
[16] Fix | Delete
[17] Fix | Delete
Another IOBase subclass, TextIOBase, deals with the encoding and decoding
[18] Fix | Delete
of streams into text. TextIOWrapper, which extends it, is a buffered text
[19] Fix | Delete
interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
[20] Fix | Delete
is an in-memory stream for text.
[21] Fix | Delete
[22] Fix | Delete
Argument names are not part of the specification, and only the arguments
[23] Fix | Delete
of open() are intended to be used as keyword arguments.
[24] Fix | Delete
[25] Fix | Delete
data:
[26] Fix | Delete
[27] Fix | Delete
DEFAULT_BUFFER_SIZE
[28] Fix | Delete
[29] Fix | Delete
An int containing the default buffer size used by the module's buffered
[30] Fix | Delete
I/O classes. open() uses the file's blksize (as obtained by os.stat) if
[31] Fix | Delete
possible.
[32] Fix | Delete
"""
[33] Fix | Delete
# New I/O library conforming to PEP 3116.
[34] Fix | Delete
[35] Fix | Delete
__author__ = ("Guido van Rossum <guido@python.org>, "
[36] Fix | Delete
"Mike Verdone <mike.verdone@gmail.com>, "
[37] Fix | Delete
"Mark Russell <mark.russell@zen.co.uk>, "
[38] Fix | Delete
"Antoine Pitrou <solipsis@pitrou.net>, "
[39] Fix | Delete
"Amaury Forgeot d'Arc <amauryfa@gmail.com>, "
[40] Fix | Delete
"Benjamin Peterson <benjamin@python.org>")
[41] Fix | Delete
[42] Fix | Delete
__all__ = ["BlockingIOError", "open", "IOBase", "RawIOBase", "FileIO",
[43] Fix | Delete
"BytesIO", "StringIO", "BufferedIOBase",
[44] Fix | Delete
"BufferedReader", "BufferedWriter", "BufferedRWPair",
[45] Fix | Delete
"BufferedRandom", "TextIOBase", "TextIOWrapper",
[46] Fix | Delete
"UnsupportedOperation", "SEEK_SET", "SEEK_CUR", "SEEK_END"]
[47] Fix | Delete
[48] Fix | Delete
[49] Fix | Delete
import _io
[50] Fix | Delete
import abc
[51] Fix | Delete
[52] Fix | Delete
from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
[53] Fix | Delete
open, FileIO, BytesIO, StringIO, BufferedReader,
[54] Fix | Delete
BufferedWriter, BufferedRWPair, BufferedRandom,
[55] Fix | Delete
IncrementalNewlineDecoder, TextIOWrapper)
[56] Fix | Delete
[57] Fix | Delete
OpenWrapper = _io.open # for compatibility with _pyio
[58] Fix | Delete
[59] Fix | Delete
# for seek()
[60] Fix | Delete
SEEK_SET = 0
[61] Fix | Delete
SEEK_CUR = 1
[62] Fix | Delete
SEEK_END = 2
[63] Fix | Delete
[64] Fix | Delete
# Declaring ABCs in C is tricky so we do it here.
[65] Fix | Delete
# Method descriptions and default implementations are inherited from the C
[66] Fix | Delete
# version however.
[67] Fix | Delete
class IOBase(_io._IOBase):
[68] Fix | Delete
__metaclass__ = abc.ABCMeta
[69] Fix | Delete
__doc__ = _io._IOBase.__doc__
[70] Fix | Delete
[71] Fix | Delete
class RawIOBase(_io._RawIOBase, IOBase):
[72] Fix | Delete
__doc__ = _io._RawIOBase.__doc__
[73] Fix | Delete
[74] Fix | Delete
class BufferedIOBase(_io._BufferedIOBase, IOBase):
[75] Fix | Delete
__doc__ = _io._BufferedIOBase.__doc__
[76] Fix | Delete
[77] Fix | Delete
class TextIOBase(_io._TextIOBase, IOBase):
[78] Fix | Delete
__doc__ = _io._TextIOBase.__doc__
[79] Fix | Delete
[80] Fix | Delete
RawIOBase.register(FileIO)
[81] Fix | Delete
[82] Fix | Delete
for klass in (BytesIO, BufferedReader, BufferedWriter, BufferedRandom,
[83] Fix | Delete
BufferedRWPair):
[84] Fix | Delete
BufferedIOBase.register(klass)
[85] Fix | Delete
[86] Fix | Delete
for klass in (StringIO, TextIOWrapper):
[87] Fix | Delete
TextIOBase.register(klass)
[88] Fix | Delete
del klass
[89] Fix | Delete
[90] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function