python: webbrowser module causes my program to stick
I'm building this program in python and figure using webbrowser would be a good cross-platform way of launching the browser. Well when my script gets to webbroswer.open(url), it opens the browser but my program then hangs. From the terminal where I ran my script I have to press control-c to get my program to respond again. I get this output:
Traceback (most recent call last):
File "main.py", line 102, in openDavid
webbrowser.open_new_tab(url)
File "/usr/lib64/python2.6/webbrowser.py", line 69, in open_new_tab
return open(url, 2)
File "/usr/lib64/python2.6/webbrowser.py", line 61, in open
if browser.open(url, new, autoraise):
File "/usr/lib64/python2.6/webbrowser.py", line 365, in open
p.wait()
File "/usr/lib64/python2.6/subprocess.py", line 1137, in wait
pid, sts = os.waitpid(self.pid, 0)
KeyboardInterrupt
Think its a bug? How could I get around this? I figured trying to use os.system ('firefox') wouldnt work on both linux and windows.
|