Home
last modified time | relevance | path

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

12345678910>>...13

/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.py23 inp = cStringIO.StringIO(plaintext)
24 out = cStringIO.StringIO()
27 inp = cStringIO.StringIO(plaintext)
28 out = cStringIO.StringIO()
33 inp = cStringIO.StringIO(encodedtextwrapped % (0666, "t1"))
34 out = cStringIO.StringIO()
37 inp = cStringIO.StringIO(
42 out = cStringIO.StringIO()
47 inp = cStringIO.StringIO("begin 644 t1\n" + encodedtext)
48 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))
234 stream = StringIO.StringIO("".join(s).encode(self.encoding))
272 stream = StringIO.StringIO(s)
287 stream = StringIO.StringIO(s)
309 s = StringIO.StringIO()
317 s = StringIO.StringIO(d)
322 s = StringIO.StringIO(4*"\xff")
326 s = StringIO.StringIO(8*"\xff")
[all …]
Dtest_plistlib.py163 from StringIO import StringIO
164 f = StringIO()
167 pl2 = plistlib.readPlist(StringIO(f.getvalue()))
171 from cStringIO import StringIO
172 f = StringIO()
175 pl2 = plistlib.readPlist(StringIO(f.getvalue()))
Dtest_pickle.py3 from cStringIO import StringIO
47 f = StringIO(buf)
54 f = StringIO()
63 f = StringIO(buf)
73 f = StringIO()
85 f = StringIO(buf)
/external/antlr/antlr-3.4/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/antlr-3.4/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/toolchain-utils/crosperf/
Dexperiment_file_unittest.py9 import StringIO
91 input_file = StringIO.StringIO(EXPERIMENT_FILE_1)
111 input_file = StringIO.StringIO(EXPERIMENT_FILE_2)
124 input_file = StringIO.StringIO(EXPERIMENT_FILE_3)
128 input_file = StringIO.StringIO(EXPERIMENT_FILE_1)
/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/v8/tools/ignition/
Dlinux_perf_report_test.py6 import StringIO
53 perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT)
67 perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT)
125 perf_stream = StringIO.StringIO("""
Dlinux_perf_bytecode_annotate_test.py5 import StringIO
69 perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT)
75 codegen_stream = StringIO.StringIO(D8_CODEGEN_OUTPUT)
/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/tpm2/generator/
Dstructure_generator_test.py11 import StringIO
28 out_file = StringIO.StringIO()
42 out_file = StringIO.StringIO()
57 out_file = StringIO.StringIO()
73 out_file = StringIO.StringIO()
104 out_file = StringIO.StringIO()
120 out_file = StringIO.StringIO()
/external/autotest/server/site_tests/telemetry_Crosperf/
Dtelemetry_Crosperf.py7 import StringIO
74 stdout = StringIO.StringIO()
75 stderr = StringIO.StringIO()
170 stdout = StringIO.StringIO()
171 stderr = StringIO.StringIO()
/external/autotest/server/site_tests/native_Benchmarks/
Dnative_Benchmarks_common.py7 import StringIO
22 stdout = StringIO.StringIO()
23 stderr = StringIO.StringIO()
/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
Dreadererr.py8 import StringIO
9 str_io = StringIO.StringIO
12 str_io = io.StringIO
Dreader4.py8 import StringIO
9 str_io = StringIO.StringIO
12 str_io = io.StringIO

12345678910>>...13