file.getvalue() with _ or other characters

Peter Hansen peter at
Fri Mar 4 00:35:00 CET 2005

martijn at wrote:
> I did this but don't work:

It is quite possible I misunderstood the problem you
were having.  I am familiar with a problem with StringIO
whereby if you call close() on it, you can no longer call
getvalue() afterwards.  Perhaps that's not the problem
you were seeing.

Can you clarify your comment "But then the _ characters are
away. is it possible to keep that character in file.getvalue()"?

Please show actual (small!) examples of the sort of input
you are dealing with, and the output which you are getting
(if any).


More information about the Python-list mailing list