[python-win32] Interactive Code to Script File
Bob Hood
bhood2 at comcast.net
Wed Sep 17 01:05:11 CEST 2014
Hi, DJ.
On 9/16/2014 1:13 PM, DJ Webre wrote:
> 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?
That code worked perfectly for me in a Python script file when run from the
command line (Windows 7 64-bit, Python 2.7.6 64-bit).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140916/9b307eeb/attachment.html>
More information about the python-win32
mailing list