Top "Stringio" questions

Use for questions concerning the Python 2 module StringIO or the class StringIO it contains.

Retrieving the output of subprocess.call()

How can I get the output of a process run using subprocess.call()? Passing a StringIO.StringIO object to stdout …

python pipe subprocess stringio
python 3.x ImportError: No module named 'cStringIO'

How do I solve an ImportError: No module named 'cStringIO' under Python 3.x?

python-3.x stringio cstringio
Python3 error: initial_value must be str or None, with StringIO

While porting code from python2 to 3, I get this error when reading from a URL TypeError: initial_value must be …

python python-3.x urllib urllib2 stringio
How to loop until EOF in Python?

I need to loop until I hit the end of a file-like object, but I'm not finding an "obvious way …

python eof stringio
When is StringIO used, as opposed to joining a list of strings?

Using StringIO as string buffer is slower than using list as buffer. When is StringIO used? from io import StringIO …

python stringio
Download and decompress gzipped file in memory?

I would like to download a file using urllib and decompress the file in memory before saving. This is what …

python file gzip urllib2 stringio
StringIO replacement that works with bytes instead of strings?

Is there any replacement for python StringIO class, one that will work with bytes instead of strings? It may not …

python unicode python-2.7 stringio
Extracting a zipfile to memory?

How do I extract a zip to memory? My attempt (returning None on .getvalue()): from zipfile import ZipFile from StringIO …

python memory zip zipfile stringio
how do I clear a stringio object?

I have a stringio object created and it has some text in it. I'd like to clear its existing values …

python stringio
What is the best way to write the contents of a StringIO to a file?

What is the best way to write the contents of a StringIO buffer to a file ? I currently do something …

python file-io stringio