bad data from urllib when run from MS .bat file
Fredrik Lundh
fredrik at pythonware.com
Tue Sep 21 04:01:50 EDT 2004
John J. Lee wrote:
> But I have a fairly strong suspicion that this *isn't* a bug in urllib
> or Python: I think urllib regards HTTP response data simply as a
> binary string
that's correct.
the bug is most likely elsewhere; probably in the interaction between
print and cmd redirection, or perhaps in the interaction between cmd
and sys.argv. to test it, get rid of all the junk you can get rid of: that
is, embed the URL in the test script, and write output to a binary file,
and use a hexdump tool to look at the file (use "debug" if you don't
have any better tool).
</F>
More information about the Python-list
mailing list