[Tutor] Starting a browser instance and passing a parameter to it.
alan.gauld at btinternet.com
Thu Nov 29 10:10:34 CET 2007
"Don Taylor" <nospamformeSVP at gmail.com> wrote
> I have this code:
> import webbrowser
> when executed it does bring up the web-page ok, but the parameter
> (?open=8001) is lost. If I try the same thing with an http url then
> works as expected. However, I do not want to run a web-server on my
> Is there any way I can get a browser to display a web-page from a
> file-based url and pass a parameter to the code running in that
I don't think so because the file protocol does not support the
GET/POST methods of http. You could maybe change the
to just run a web srver on an unusual port - maybe the simple
web server that comes with Python.
> FWIW. I am trying to use a web page as the GUI for a Python
> The Python program is started in the usual way and it initiates its
> Python program using XML-RPC. The parameter I need to pass is the
> number to be used for this communication.
What are you using for the XML-RPC server? Doesn't that need to be a
web server of some sort anyhow? XML-RPC communicates using http...
You seem to be making a fairly easy task very complicated.
> I am currently using WinXP/Firefox but I want this to work on all
> platforms and browser combos.
More information about the Tutor