Re: Spoiler to Python Challenge (help!!!)

2005-09-29 Thread Ian Vincent
Terry Hancock [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: bz2.decompress(eval('' + user + '')) Sorry about that. I was trying the other as an alternative, but in fact, it doesn't work. So ignore that. Excellent! Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Spoiler to Python Challenge (help!!!)

2005-09-28 Thread Ian Vincent
Terry Reedy [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: please, line = line[20:-1], etc, is easier to read and understand ;-) Thanks, i'll put that in. -- http://mail.python.org/mailman/listinfo/python-list

Re: Spoiler to Python Challenge (help!!!)

2005-09-28 Thread Ian Vincent
Terry Hancock [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Took me a long time to figure out what you meant. ;-) So the string actually contains the backslashes, not the escaped characters. This works: bz2.decompress(eval(repr(user))) 'huge' Unfortunately, it doesn't. Get

Re: Spoiler to Python Challenge (help!!!)

2005-09-28 Thread Terry Hancock
On Tuesday 27 September 2005 10:42 am, Terry Hancock wrote: bz2.decompress(eval(repr(user))) 'huge' Actually, it doesn't -- I sent you the wrong version of the email. THIS works (and is what actually produced the output above). bz2.decompress(eval('' + user + '')) Sorry about that. I was

Spoiler to Python Challenge (help!!!)

2005-09-27 Thread Ian Vincent
Damn this is annoying me. I have a webpage with a BZ2 compressed text embedded in it looking like: 'BZh91AYSYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M \x07]\xc9\x14\xe1BA\x06\xbe\x084' Now, if I simply copy and paste this into Python and decompress it - it works a treat.

Re: Spoiler to Python Challenge (help!!!)

2005-09-27 Thread Terry Reedy
Ian Vincent [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] line = line[20:] line = line[:-1] please, line = line[20:-1], etc, is easier to read and understand ;-) tjr -- http://mail.python.org/mailman/listinfo/python-list

Re: Spoiler to Python Challenge (help!!!)

2005-09-27 Thread Terry Hancock
On Tuesday 27 September 2005 08:32 am, Ian Vincent wrote: I have a webpage with a BZ2 compressed text embedded in it looking like: 'BZh91AYSYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M \x07]\xc9\x14\xe1BA\x06\xbe\x084' Now, if I simply copy and paste this into Python and