webbrowser
Antonio Ceballos
aceballos at gmail.com
Wed Nov 14 19:48:20 EST 2007
Dennis, Cameron,
You are absolutely right. I was not aware that the cgi was trying to open
the new browser on the server -I am a beginner with cgi, python and
javascript.
This simple javascript does the job perfectly:
window.open("http://www.google.com");
Thanks a lot,
Antonio
"Antonio Ceballos" <aceballos at gmail.com> escribió en el mensaje
news:fhdhl4$ag0$1 at hefestos.uned.es...
> Hello,
>
> I am trying to open a URL on a new browser or new tab from an HTML page
> created from a python cgi script. On Apache in my localhost, it works,
> both with Internet Explorer and Firefox. However, when I upload the script
> to a remote server, it does not. A 500 Internal Server Error is displayed
> on the browser.
>
> The (simplified) piece of code is as follows:
>
> import webbrowser
> webbrowser.open_new(http://www.google.com)
>
> The server runs python 2.3. I am using python 2.5 in my localhost.
>
> Can anybody figure out why this may be happening?
>
> Cheers,
> Antonio
>
>
More information about the Python-list
mailing list