Hi,

You are doing it right but, for the URL string use " "(double quotes). you
should be fine
https://docs.python.org/2.0/ref/strings.html

import webbrowser
webbrowser.open_new("https://www.google.org/";)


Thanks,
Abhay

On Tue, Sep 16, 2014 at 12:13 PM, DJ Webre <d_we...@yahoo.com.dmarc.invalid>
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?
>
> Thanks in advance for any assistance.
>
> D. J.
>
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> https://mail.python.org/mailman/listinfo/python-win32
>
>


-- 
Thank you,
Abhay Anant Jahagirdar
MS candidate at Dept. of Computer Science
University of Southern California
Email: jahag...@usc.edu
Phone: (323) 578-1548
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to