homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lars.gustaebel
Recipients lars.gustaebel, strombrg
Date 2010年11月09日.10:42:39
SpamBayes Score 0.00059214554
Marked as misclassified No
Message-id <1289299361.4.0.0116687672033.issue10369@psf.upfronthosting.co.za>
In-reply-to
Content
Hm, why don't you just do this:
with stat_tarfile.open(fileobj = sys.stdout, mode = "w|") as tar:
 for number in xrange(100):
 fileobj = generate_file_content(number)
 tarinfo = tar.gettarinfo(fileobj=open("/etc/passwd")) 
 tarinfo.name = 'file-%d.txt' % number
 tarinfo.size = len(str(number)) * 100
 tarinfo.uid = 1000
 tarinfo.gid = 1000
 tarinfo.uname = "dstromberg"
 tarinfo.gname = "dstromberg"
 tar.addfile(tarinfo, fileobj)
Wouldn't that work, too? Or am I missing something?
History
Date User Action Args
2010年11月09日 10:42:41lars.gustaebelsetrecipients: + lars.gustaebel, strombrg
2010年11月09日 10:42:41lars.gustaebelsetmessageid: <1289299361.4.0.0116687672033.issue10369@psf.upfronthosting.co.za>
2010年11月09日 10:42:40lars.gustaebellinkissue10369 messages
2010年11月09日 10:42:39lars.gustaebelcreate

AltStyle によって変換されたページ (->オリジナル) /