Top "Stringio" questions

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

Do I have to do StringIO.close()?

Some code: import cStringIO def f(): buffer = cStringIO.StringIO() buffer.write('something') return buffer.getvalue() The documentation says: StringIO.close(): …

python stringio
Confusing about StringIO, cStringIO and ByteIO

I have googled and also search on SO for the difference between these buffer modules. However, I still don't understand …

python stringio bytesio cstringio
Write to StringIO object using Pandas Excelwriter?

I can pass a StringIO object to pd.to_csv() just fine: io = StringIO.StringIO() pd.DataFrame().to_csv(io) …

python excel pandas stringio xlsxwriter
Python - generate csv file in memory and then encode its data into base64?

I need to generate csv file like data in memory and then encode it to base64, so I could save …

python csv memory base64 stringio
io.StringIO encoding in python3

I can't seem to find what's the default encoding for io.StringIO in Python3. Is it the locale as with …

encoding utf-8 python-3.x stringio
Serving Excel(xlsx) file to the user for download in Django(Python)

I'm trying create and serve excel files using Django. I have a jar file which gets parameters and produces an …

python django excel xlsx stringio
Strange "BadZipfile: Bad CRC-32" problem

This code is simplification of code in a Django app that receives an uploaded zip file via HTTP multi-part POST …

zipfile stringio bytesio
Python logging to StringIO handler

I have a python test in which I want to test if the logging works properly. For example I have …

python unit-testing logging stringio
Storing image using open URI and paperclip having size less than 10kb

I want to import some icons from my old site. The size of those icons is less than 10kb. So …

ruby-on-rails image paperclip stringio
Pycurl and io.StringIO - pycurl.error: (23, 'Failed writing body)

I'm porting ebay sdk to python3 and I've stumbled upon the following issue. I'm using pycurl to send some HTTP …

python curl python-3.x pycurl stringio