[python-win32] Interactive Code to Script File

DJ Webre d_webre at yahoo.com
Tue Sep 16 21:13:32 CEST 2014


I am trying to convert a program from interactive to script file.  

The program consists of the following 2 lines:

import webbrowser
webbrowser.open_new('http://www.google')

When I run it interactively, it works but if I run it as a scrip file, it produces an error unless I import webbrowser interactively.

What am I doing wrong?

Thanks in advance for any assistance.
 
D. J. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140916/54058332/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Error.doc
Type: application/msword
Size: 83456 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140916/54058332/attachment-0001.doc>


More information about the python-win32 mailing list