[Tutor] Selecting a browser

Simone simozack at yahoo.it
Tue Dec 4 08:28:55 CET 2007


Ricardo Aráoz ha scritto:


>> ff = webbrowser.get("S:/FirefoxPortable/FirefoxPortable.exe %s &")
> That did it, but as I told Kent :
> 
> ff.open('http://www.google.com')
> Traceback (most recent call last):
>   File "<input>", line 1, in <module>
>   File "E:\Python25\lib\webbrowser.py", line 168, in open
>     p = subprocess.Popen(cmdline, close_fds=True)
>   File "E:\Python25\lib\subprocess.py", line 551, in __init__
>     raise ValueError("close_fds is not supported on Windows "
> ValueError: close_fds is not supported on Windows platforms

I think the problem is in '&' at the end of the command line.

The '&' is used on Linux/Unix system to start processes in a independent 
thread.

Remove it and it works!

Simone
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


More information about the Tutor mailing list