Home | History | Annotate | Download | only in python2.7

Lines Matching defs:encoding

44          encoding=None, errors=None,
60 current seek position). In text mode, if encoding is not specified the
61 encoding used is platform dependent. (For reading and writing raw
62 bytes use binary mode and leave encoding unspecified.) The available
88 platform-dependent encoding or using the specified encoding if given.
105 encoding is the name of the encoding used to decode or encode the
106 file. This should only be used in text mode. The default encoding is
107 platform dependent, but any encoding supported by Python can be
110 errors is an optional string that specifies how encoding errors are to
112 'strict' to raise a ValueError exception if there is an encoding error
114 errors. (Note that ignoring encoding errors can lead to data loss.)
116 encoding error strings.
160 if encoding is not None and not isinstance(encoding, basestring):
161 raise TypeError("invalid encoding: %r" % encoding)
183 if binary and encoding is not None:
184 raise ValueError("binary mode doesn't take an encoding argument")
224 text = TextIOWrapper(buffer, encoding, errors, newline, line_buffering)
234 "open(file, mode='r', buffering=-1, encoding=None, "
1338 def encoding(self):
1451 encoding gives the name of the encoding that the stream will be
1454 errors determines the strictness of encoding and decoding (see the
1473 def __init__(self, buffer, encoding=None, errors=None, newline=None,
1479 if encoding is None:
1484 encoding = "ascii"
1486 encoding = locale.getpreferredencoding()
1488 if not isinstance(encoding, basestring):
1489 raise ValueError("invalid encoding: %r" % encoding)
1499 self._encoding = encoding
1535 return "<_pyio.TextIOWrapper encoding='{0}'>".format(self.encoding)
1537 return "<_pyio.TextIOWrapper name={0!r} encoding='{1}'>".format(
1538 name, self.encoding)
1541 def encoding(self):
1985 encoding="utf-8",
2003 # TextIOWrapper tells the encoding in its repr. In StringIO,
2012 def encoding(self):