webbrowser module's Firefox support

MonkeeSage MonkeeSage at gmail.com
Sat Sep 23 20:02:10 EDT 2006


Dustan wrote:
> >>> cont=webbrowser._browsers['firefox'][1]

Why not use the api? cont=webbrowser.get('firefox')

> 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.

Regards,
Jordan




More information about the Python-list mailing list