Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
stringio+tarfile
 

Index | Next | Previous | View Flat


user at example

Jul 2, 2009, 1:57 PM


Views: 305
Permalink
stringio+tarfile

why the following does not work? can you help me correct (if possible)?

1 import tarfile
2 import StringIO
3 sf1 = StringIO.StringIO("one\n")
4 sf2 = StringIO.StringIO("two\n")
5 tf = StringIO.StringIO()
6 tar = tarfile.open(tf , "w")
7 for name in [sf1 , sf2]:
8 tar.add(name)
9 print tf
10 sf1.close()
11 sf2.close()
12 tf.close()
13 tar.close()

tia
--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
stringio+tarfile user at example Jul 2, 2009, 1:57 PM
    Re: stringio+tarfile gagsl-py2 at yahoo Jul 2, 2009, 6:28 PM
    Re: stringio+tarfile davea at ieee Jul 2, 2009, 7:35 PM
    Re: stringio+tarfile user at example Jul 3, 2009, 4:21 AM
        Re: stringio+tarfile lie.1296 at gmail Jul 3, 2009, 6:16 AM
    Re: stringio+tarfile user at example Jul 3, 2009, 4:29 AM
        Re: stringio+tarfile __peter__ at web Jul 3, 2009, 5:12 AM
            Re: stringio+tarfile user at example Jul 3, 2009, 10:42 AM
    Re: stringio+tarfile (or better... zipfile) user at example Jul 3, 2009, 1:14 PM
        Re: stringio+tarfile (or better... zipfile) gagsl-py2 at yahoo Jul 3, 2009, 8:50 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.