Home
last modified time | relevance | path

Searched refs:StringIO (Results 1 – 25 of 611) sorted by relevance

12345678910>>...25

/external/python/cpython2/Doc/library/
Dstringio.rst2 :mod:`StringIO` --- Read and write strings as files
5 .. module:: StringIO
9 This module implements a file-like class, :class:`~StringIO.StringIO`, that reads and
15 .. class:: StringIO([buffer])
17 When a :class:`~StringIO.StringIO` object is created, it can be initialized to an existing
19 :class:`~StringIO.StringIO` will start empty. In both cases, the initial file position
22 The :class:`~StringIO.StringIO` object can accept either Unicode or 8-bit strings, but
27 The following methods of :class:`~StringIO.StringIO` objects require special mention:
30 .. method:: StringIO.getvalue()
33 :class:`~StringIO.StringIO` object's :meth:`close` method is called. See the note above
[all …]
/external/python/cpython2/Lib/lib2to3/tests/
Dtest_main.py8 import StringIO
55 input_stream = StringIO.StringIO(u"print 'nothing'\nprint u'über'\n")
56 out = StringIO.StringIO()
58 err = StringIO.StringIO()
88 out = StringIO.StringIO()
89 err = StringIO.StringIO()
95 StringIO.StringIO(""), out, err)
117 err = StringIO.StringIO()
123 StringIO.StringIO(""), StringIO.StringIO(), err)
134 err = StringIO.StringIO()
[all …]
/external/python/cpython2/Lib/test/
Dtest_mimetools.py5 import StringIO
9 msgtext1 = mimetools.Message(StringIO.StringIO(
22 i = StringIO.StringIO(start)
23 o = StringIO.StringIO()
25 i = StringIO.StringIO(o.getvalue())
26 o = StringIO.StringIO()
38 msg = mimetools.Message(StringIO.StringIO(msgtext1))
Dtest_cmd.py12 import StringIO
193 input = StringIO.StringIO("print test\nprint test2")
194 output = StringIO.StringIO()
205 input = StringIO.StringIO("print test\nprint test2")
206 output = StringIO.StringIO()
214 input = StringIO.StringIO("print \n\n")
215 output = StringIO.StringIO()
Dtest_uu.py24 inp = cStringIO.StringIO(plaintext)
25 out = cStringIO.StringIO()
28 inp = cStringIO.StringIO(plaintext)
29 out = cStringIO.StringIO()
34 inp = cStringIO.StringIO(encodedtextwrapped % (0666, "t1"))
35 out = cStringIO.StringIO()
38 inp = cStringIO.StringIO(
43 out = cStringIO.StringIO()
48 inp = cStringIO.StringIO("begin 644 t1\n" + encodedtext)
49 out = cStringIO.StringIO()
[all …]
Dtest_StringIO.py4 import StringIO
24 self._fp = self.MODULE.StringIO(self._lines)
38 f = self.MODULE.StringIO()
47 f = self.MODULE.StringIO()
56 f = self.MODULE.StringIO()
61 f = self.MODULE.StringIO()
75 f = self.MODULE.StringIO()
79 f = self.MODULE.StringIO("abc")
85 f = self.MODULE.StringIO()
115 f = self.MODULE.StringIO(''.join(lines))
[all …]
Dtest_codecs.py5 import sys, StringIO
79 stream = StringIO.StringIO(input.encode(self.encoding))
143 stream = StringIO.StringIO(data.encode(self.encoding))
248 stream = StringIO.StringIO("".join(s).encode(self.encoding))
286 stream = StringIO.StringIO(s)
301 stream = StringIO.StringIO(s)
323 s = StringIO.StringIO()
331 s = StringIO.StringIO(d)
336 s = StringIO.StringIO(4*"\xff")
340 s = StringIO.StringIO(8*"\xff")
[all …]
/external/chromium-trace/catapult/common/py_trace_event/py_trace_event/trace_event_impl/
Dperfetto_trace_writer_unittest.py7 import StringIO
22 result = StringIO.StringIO()
36 result = StringIO.StringIO()
62 result = StringIO.StringIO()
82 result = StringIO.StringIO()
108 result = StringIO.StringIO()
119 result = StringIO.StringIO()
/external/antlr/runtime/Ruby/test/functional/main/
Dmain-scripts.rb50 output = StringIO.new
62 input = StringIO.new( "yada yada" ) # <- used to simulate $stdin
63 output = StringIO.new
88 output = StringIO.new
89 input = StringIO.new( 'yada yada' )
112 output = StringIO.new
113 input = StringIO.new 'yada + yada'
147 output = StringIO.new
148 input = StringIO.new 'a+b'
184 output = StringIO.new
[all …]
/external/antlr/runtime/Python/tests/
Dt054main.py9 from StringIO import StringIO
38 stdout = StringIO()
65 stdout = StringIO()
90 stdout = StringIO()
95 stdin=StringIO(input),
116 stdout = StringIO()
121 stdin=StringIO(input),
144 stdout = StringIO()
149 stdin=StringIO(input),
175 stdout = StringIO()
[all …]
/external/antlr/runtime/Python3/tests/
Dt054main.py8 from io import StringIO
37 stdout = StringIO()
58 stdout = StringIO()
83 stdout = StringIO()
88 stdin=StringIO(input),
109 stdout = StringIO()
114 stdin=StringIO(input),
137 stdout = StringIO()
142 stdin=StringIO(input),
168 stdout = StringIO()
[all …]
/external/python/pybind11/tests/
Dtest_iostream.py9 from io import StringIO
13 from cStringIO import StringIO
15 from StringIO import StringIO
108 stream = StringIO()
116 stream = StringIO()
127 stream = StringIO()
135 stream = StringIO()
145 stream = StringIO()
165 stream = StringIO()
172 stream = StringIO()
[all …]
/external/protobuf/objectivec/DevTools/
Dpddm_tests.py44 f = io.StringIO(u'')
49 f = io.StringIO(u"""PDDM-DEFINE foo( )
61 f = io.StringIO(u"""
91 f = io.StringIO(u"""
119 f = io.StringIO(input_str)
174 f = io.StringIO(input_str)
186 f = io.StringIO(u"""
230 f = io.StringIO(u"""
243 f = io.StringIO(u"""
276 f = io.StringIO(u"""
[all …]
/external/python/cpython2/Lib/encodings/
Dquopri_codec.py8 from cStringIO import StringIO
10 from StringIO import StringIO
22 f = StringIO(str(input))
23 g = StringIO()
37 f = StringIO(str(input))
38 g = StringIO()
Duu_codec.py26 from cStringIO import StringIO
29 infile = StringIO(str(input))
30 outfile = StringIO()
62 from cStringIO import StringIO
64 infile = StringIO(str(input))
65 outfile = StringIO()
/external/python/cpython2/Lib/
Dshelve.py67 from cStringIO import StringIO
69 from StringIO import StringIO
121 f = StringIO(self.dict[key])
130 f = StringIO()
194 f = StringIO(value)
199 f = StringIO(value)
204 f = StringIO(value)
209 f = StringIO(value)
214 f = StringIO(value)
/external/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/test/
Dtest_runner.py3 from cStringIO import StringIO
26 runner = unittest2.TextTestRunner(stream=StringIO(), failfast=True,
47 runner = unittest2.TextTestRunner(stream=StringIO())
71 runner = unittest2.TextTestRunner(stream=StringIO(),
85 super(LoggingRunner, self).__init__(StringIO())
100 import StringIO
102 stream = StringIO.StringIO("foo")
129 stream=StringIO())
/external/python/cpython3/Lib/lib2to3/tests/
Dtest_main.py45 input_stream = io.StringIO("print 'nothing'\nprint u'über'\n")
48 err = io.StringIO()
78 out = io.StringIO()
79 err = io.StringIO()
85 io.StringIO(""), out, err)
107 err = io.StringIO()
113 io.StringIO(""), io.StringIO(), err)
124 err = io.StringIO()
128 io.StringIO(""), io.StringIO(), err)
/external/python/cpython3/Lib/test/
Dtest_getpass.py4 from io import BytesIO, StringIO, TextIOWrapper
54 stream = mock.Mock(spec=StringIO)
55 input = StringIO('input_string')
60 input = StringIO('input_string')
69 getpass._raw_input(stream=StringIO())
81 input = StringIO('')
85 input = StringIO('test\n')
145 mock_stream = mock.Mock(spec=StringIO)
151 mock.patch('sys.stdin', spec=StringIO) as stdin:
Dtest_cmd.py190 input = io.StringIO("print test\nprint test2")
191 output = io.StringIO()
202 input = io.StringIO("print test\nprint test2")
203 output = io.StringIO()
211 input = io.StringIO("print \n\n")
212 output = io.StringIO()
/external/autotest/server/site_tests/native_Benchmarks/
Dnative_Benchmarks_common.py7 import StringIO
22 stdout = StringIO.StringIO()
23 stderr = StringIO.StringIO()
/external/toolchain-utils/crosperf/
Dexperiment_file_unittest.py164 input_file = io.StringIO(EXPERIMENT_FILE_1)
184 input_file = io.StringIO(EXPERIMENT_FILE_2)
197 input_file = io.StringIO(EXPERIMENT_FILE_3)
201 input_file = io.StringIO(EXPERIMENT_FILE_4)
212 input_file = io.StringIO(EXPERIMENT_FILE_1)
218 input_file = io.StringIO(DUT_CONFIG_EXPERIMENT_FILE_GOOD)
231 input_file = io.StringIO(DUT_CONFIG_EXPERIMENT_FILE_BAD_GOV)
241 input_file = io.StringIO(DUT_CONFIG_EXPERIMENT_FILE_BAD_CPUUSE)
/external/libxml2/python/tests/
Dinbuf.py5 import StringIO
6 str_io = StringIO.StringIO
9 str_io = io.StringIO
Dresolver.py5 import StringIO
6 str_io = StringIO.StringIO
9 str_io = io.StringIO
/external/llvm-project/debuginfo-tests/dexter/dex/utils/
DPrettyOutputBase.py19 from io import StringIO
291 stream = Stream(StringIO())
297 stream = Stream(StringIO())
303 stream = Stream(StringIO())
309 stream = Stream(StringIO())
315 stream = Stream(StringIO())
321 stream = Stream(StringIO())
329 stream = Stream(StringIO())
334 stream = Stream(StringIO())
340 stream = Stream(StringIO())
[all …]

12345678910>>...25