Re: [Tutor] Reading individual file from tar file as a file object

2009-10-08 Thread Kent Johnson
On Thu, Oct 8, 2009 at 8:45 PM, Xbox Muncher wrote: > Works perfectly! Thanks. Yet again, I've learned I need to read better. :) And remember, if the docs are unclear, you can always look at the source, as I did... Kent ___ Tutor maillist - Tutor@pyt

Re: [Tutor] Reading individual file from tar file as a file object

2009-10-08 Thread Xbox Muncher
Works perfectly! Thanks. Yet again, I've learned I need to read better. :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reading individual file from tar file as a file object

2009-10-08 Thread Kent Johnson
On Thu, Oct 8, 2009 at 4:10 PM, xbmuncher wrote: > I have a large tar.bz2 file that I want to extract certain files directly to > an FTP path. > Since the extract() method doesn't accept ftp paths...  I wanted to read the > files from the tar file like a file object or file I/O stream. > Is there

[Tutor] Reading individual file from tar file as a file object

2009-10-08 Thread xbmuncher
I have a large tar.bz2 file that I want to extract certain files directly to an FTP path. Since the extract() method doesn't accept ftp paths... I wanted to read the files from the tar file like a file object or file I/O stream. Is there a way to do this? Here's my pseudocode: import tarfile def