[Tutor] urllib.urlopen & open differences

Mike Barrett mike@daboyz.org
Mon, 16 Jul 2001 16:19:02 -0700 (PDT)


	Hi, I was just playing with urllib and decided to mess around with
a simple website monitoring tool.  The idea is that the script would go
out, read a page, and if the page was different than a file stored (an
assumed 'good' copy), then it would send an alert.  I ran into a problem
however, when I noticed that filedescriptors returned by open() act
differently when they 'read' than filedescriptors returned by
urllib.urlopen().  
	It seems that the open() fd's return raw data (\'s
escaped) whereas urllib.urlopen() returns the data normally (no
escaping).  Does anyone know if there is a way to change this?  I'd like
to just compare the two strings, but as of now it looks like I'm going to
have to do some line editing.
	Any suggestions on how to deal with this?

     ________________________________________________________________________
                Mike Barrett | Beer is proof that God loves us 
             mike@daboyz.org | and wants us to be happy.
              www.daboyz.org | -- Benjamin Franklin
     ------------------------+-----------------------------------------------