Home
last modified time | relevance | path

Searched refs:openhook (Results 1 – 9 of 9) sorted by relevance

/external/python/cpython2/Lib/
Dfileinput.py86 mode="r", openhook=None): argument
96 _state = FileInput(files, inplace, backup, bufsize, mode, openhook)
191 mode="r", openhook=None): argument
217 if inplace and openhook:
219 elif openhook and not hasattr(openhook, '__call__'):
221 self._openhook = openhook
383 def openhook(filename, mode): function
386 return openhook
/external/python/cpython3/Lib/
Dfileinput.py84 def input(files=None, inplace=False, backup="", *, mode="r", openhook=None): argument
94 _state = FileInput(files, inplace, backup, mode=mode, openhook=openhook)
189 mode="r", openhook=None): argument
222 if openhook:
225 if not callable(openhook):
227 self._openhook = openhook
411 def openhook(filename, mode): function
413 return openhook
/external/python/cpython2/Lib/test/
Dtest_fileinput.py43 def openhook(self, filename, mode): member in LineReader
239 fi = FileInput(inplace=1, openhook=lambda f,m: None)
245 fi = FileInput(openhook=1)
252 fi = FileInput(files=t1, openhook=hook_encoded("utf-7"))
267 fi = FileInput(files=TESTFN, openhook=hook_encoded('ascii'))
280 fi = FileInput(files=['line1\nline2', 'line3\n'], openhook=src.openhook)
296 fi = FileInput(files=['line1\nline2', 'line3\n'], openhook=src.openhook)
321 openhook=hook_encoded('utf-7'))
/external/python/cpython3/Lib/test/
Dtest_fileinput.py59 def openhook(self, filename, mode): member in LineReader
264 fi = FileInput(inplace=1, openhook=lambda f, m: None)
270 fi = FileInput(openhook=1)
284 with FileInput([t], openhook=custom_open_hook) as fi:
298 openhook=hook_encoded('ascii')) as fi:
477 openhook=src.openhook) as fi:
493 openhook=src.openhook) as fi:
529 mode="r", openhook=None): argument
534 self.openhook = openhook
636 openhook = object()
[all …]
/external/python/cpython3/Doc/library/
Dfileinput.rst26 replaced by ``sys.stdin`` and the optional arguments *mode* and *openhook*
50 *openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The
58 .. function:: input(files=None, inplace=False, backup='', *, mode='r', openhook=None)
77 The keyword parameters *mode* and *openhook* are now keyword-only.
140 .. class:: FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None)
154 The *openhook*, when given, must be a function that takes two arguments,
156 cannot use *inplace* and *openhook* together.
176 The keyword parameter *mode* and *openhook* are now keyword-only.
201 Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed)``
210 fileinput.FileInput(openhook=fileinput.hook_encoded("utf-8",
/external/python/cpython2/Doc/library/
Dfileinput.rst45 *openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The
53 .. function:: input([files[, inplace[, backup[, bufsize[, mode[, openhook]]]]]])
61 Added the *mode* and *openhook* parameters.
128 .. class:: FileInput([files[, inplace[, backup[,bufsize[, mode[, openhook]]]]]])
142 The *openhook*, when given, must be a function that takes two arguments,
144 cannot use *inplace* and *openhook* together.
147 Added the *mode* and *openhook* parameters.
177 Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed)``
188 fileinput.FileInput(openhook=fileinput.hook_encoded("iso-8859-1"))``
/external/python/cpython3/Misc/NEWS.d/
D3.8.0b1.rst822 as a result the **mode** and **openhook** arguments have been made
/external/python/cpython2/Doc/whatsnew/
D2.5.rst1347 newlines` mode. Another new parameter, *openhook*, lets you use a function
/external/python/cpython3/Doc/whatsnew/
D2.5.rst1348 newlines` mode. Another new parameter, *openhook*, lets you use a function