On Sat, Apr 25, 2009 at 5:38 AM, prasad rao <prasadarao...@gmail.com> wrote: > hello > I wrote a function to fetch data using urllib and displaying the data > using internet Explorer. > it is not preparing the html file > So opening blank Explorer after complaining th html file not found. > Where is the problem? > Can I display the data read from a site without preparing > a html file? > <code> > def pp(): > @@@ import urllib > @@@ import subprocess > @@@ so=urllib.urlopen('http://www.asstr.org') > @@@ data=so.read() > @@@ de=open('C:pp.html','w') > @@@ de.write(data)
You should close de here so the file is flushed to disk: de.close() Kent > @@@ subprocess.Popen(['C:\Program Files\Internet > xplorer\\IEXPLORE','C:pp.html']) > > </CODE> > > prasad > _______________________________________________ > Tutor maillist - tu...@python.org > http://mail.python.org/mailman/listinfo/tutor > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor