2009/4/25 prasad rao <prasadarao...@gmail.com>: > So opening blank Explorer after complaining th html file not found. > Where is the problem?
There are typing errors on the below... > <code> > def pp(): > @@@ import urllib > @@@ import subprocess > @@@ so=urllib.urlopen('http://www.asstr.org') > @@@ data=so.read() > @@@ de=open('C:pp.html','w') This create a file pp.html in the directory where the script was run from. I expect you want it in c:\ so it should look like. Notice the backslash is escaped with a backslash! de = open('c:\\pp.html', 'w') > @@@ de.write(data) > @@@ subprocess.Popen(['C:\Program Files\Internet > xplorer\\IEXPLORE','C:pp.html']) Again the same issue as above plus the path to iexplore.exe is bad. subprocess.Popen(['C:\\Program Files\\Internet Explorer\\iexplore.exe','C:\\pp.html']) This works for me. Greets Sander _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor