mimicking a file in memory
Neil Cerutti
horpner at yahoo.com
Wed Dec 12 14:20:24 EST 2007
More information about the Python-list mailing list
Wed Dec 12 14:20:24 EST 2007
- Previous message (by thread): __init__ method for containers
- Next message (by thread): mimicking a file in memory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2007-12-12, mgierdal at gmail.com <mgierdal at gmail.com> wrote: > I found this solution not working. > outfile = StringIO.StringIO() > outfile.write(some_string + '\n') You need to rewind the file with outfile.seek(0) before proceeding, or storlines will encounter an immediate EOF when it attempts to read data. > ftp.storlines(command, outfile) outfile.close() -- Neil Cerutti Henry VII found walking difficult because he had an abbess on his knee. --History Exam Blooper
- Previous message (by thread): __init__ method for containers
- Next message (by thread): mimicking a file in memory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list