How do you handle a binary file?
Message: 4
Date: Tue, 13 Mar 2007 13:23:44 +0100
From: "Jean-Philippe Durand" <[EMAIL PROTECTED]>
Subject: Re: [Tutor] HTTP file download
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
Hello Ronaldo,
Try this :
import urllib
mysock = urllib.urlopen("http://www.somesite.com/file")
htmlSource = mysock.read()
mysock.close()
print htmlSource
Regards.
Jean-Philippe DURAND
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor