webbrowser module's Firefox support
DustanGroups at gmail.com
Sun Sep 24 02:15:14 CEST 2006
> Dustan wrote:
> > >>> cont=webbrowser._browsers['firefox']
> Why not use the api? cont=webbrowser.get('firefox')
That didn't work either.
> > ValueError: close_fds is not supported on Windows platforms
> > Looking in the docs on subprocess.Popopen
> > (http://docs.python.org/lib/node529.html), it says "If close_fds is
> > true, all file descriptors except 0, 1 and 2 will be closed before the
> > child process is executed. (Unix only)". I have to be frank; I have no
> > idea what this means. What should I do to fix this?
> It just means that on *nix there is an option to close all open file
> handles except stdin, out and err before the browser is called. I'm
> thinking that mabye get() does an OS check to see how to call
> subprocess.Popen, and you effectively bypassed it by using the
> lower-level _browsers attribute. But I could be wrong. Try it with
> get() and see how that goes.
Another thing: your fix is only temporary. Is there a way to make it
work even after I close IDLE? I changed the command you gave me a bit
so it doesn't get rid of the other paths:
os.environ["PATH"]+=";C:\Program Files\Mozilla Firefox;" # can't
remember the path for firefox right now...
But either way, it ends up going right back to the previous value after
I close IDLE.
More information about the Python-list