1 classTextIOWrapper(_TextIOBase):2 """3 Character and line based layer over a BufferedIOBase object, buffer.4
5 encoding gives the name of the encoding that the stream will be6 decoded or encoded with. It defaults to locale.getpreferredencoding(False).7
8 errors determines the strictness of encoding and decoding (see9 help(codecs.Codec) or the documentation forcodecs.register) and10 defaults to "strict".11
12 newline controls how line endings are handled. It can be None, '',13 '\n', '\r', and '\r\n'. It works asfollows:14
15 * On input, if newline is None, universal newlines mode is
16 enabled. Lines in the input can end in '\n', '\r', or '\r\n', and17 these are translated into '\n'before being returned to the18 caller. If it is '', universal newline mode isenabled, but line19 endings are returned to the caller untranslated. If it has any of20 the other legal values, input lines are only terminated by the given21 string, and the line ending isreturned to the caller untranslated.22
23 * On output, if newline is None, any '\n'characters written are24 translated to the system defaultline separator, os.linesep. If25 newline is '' or '\n', no translation takes place. If newline isany26 of the other legal values, any '\n'characters written are translated27 to the given string.28
29 If line_buffering is True, a call to flush isimplied when a call to30 write contains a newline character.31 """32 def close(self, *args, **kwargs): # real signature unknown33 关闭文件34 pass35
36 def fileno(self, *args, **kwargs): # real signature unknown37 文件描述符38 pass39
40 def flush(self, *args, **kwargs): # real signature unknown41 刷新文件内部缓冲区42 pass43
44 def isatty(self, *args, **kwargs): # real signature unknown45 判断文件是否是同意tty设备46 pass47
48 def read(self, *args, **kwargs): # real signature unknown49 读取指定字节数据50 pass51
52 def readable(self, *args, **kwargs): # real signature unknown53 是否可读54 pass55
56 def readline(self, *args, **kwargs): # real signature unknown57 仅读取一行数据58 pass59
60 def seek(self, *args, **kwargs): # real signature unknown61 指定文件中指针位置62 pass63
64 def seekable(self, *args, **kwargs): # real signature unknown65 指针是否可操作66 pass67
68 def tell(self, *args, **kwargs): # real signature unknown69 获取指针位置70 pass71
72 def truncate(self, *args, **kwargs): # real signature unknown73 截断数据,仅保留指定之前数据74 pass75
76 def writable(self, *args, **kwargs): # real signature unknown77 是否可写78 pass79
80 def write(self, *args, **kwargs): # real signature unknown81 写内容82 pass83
84 def __getstate__(self, *args, **kwargs): # real signature unknown85 pass86
87 def __init__(self, *args, **kwargs): # real signature unknown88 pass89
90 @staticmethod # known caseof __new__91 def __new__(*args, **kwargs): # real signature unknown92 """Create and return a new object. See help(type) for accurate signature."""
93 pass94
95 def __next__(self, *args, **kwargs): # real signature unknown96 """Implement next(self)."""
97 pass98
99 def __repr__(self, *args, **kwargs): # real signature unknown100 """Return repr(self)."""
101 pass102
103 buffer = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
104
105 closed = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
106
107 encoding = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
108
109 errors = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
110
111 line_buffering = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
112
113 name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
114
115 newlines = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
116
117 _CHUNK_SIZE = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
118
119 _finalizing = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
120
121 Python 3.x