On Wednesday, May 11, 2005, at 20:43 America/Chicago, [EMAIL PROTECTED] wrote:
> I believe Max's guess was that the file is compressed with bzip (the > first > two characters will be BZ, as you found). Try doing: > >>>> import bz2 >>>> print bz2.decompress(data) > > Where data is a string containing the characters you have. (Although > you > say that compression is unlikely, the BZ characters would be a big > co-incidence). > That interactive mode is *very* helpful. If you import a module and then do a directory on it to see what it has for "tools" and then start playing with them, you can learn some interesting things without a lot of overhead: ### >>> import bz2 >>> dir(bz2) ['BZ2Compressor', 'BZ2Decompressor', 'BZ2File', '__author__', '__doc__', '__file__', '__name__', 'compress', 'decompress'] >>> bz2.compress('foo') "BZh91AY&SYI\xfe\xc4\xa5\x00\x00\x00\x01\x00\x01\x00\xa0\x00!\x00\x82,]\ xc9\x14\xe1BA'\xfb\x12\x94" >>> bz2.decompress(_) #underscore to reference last thing 'foo' ### Hmmm... /c _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor