I am creating a small Python program that calls a module webbrowserto open a URL. Opening a URL works great.
My problem is that as soon as this line of code is reached, the problem is not responding. How to get a program to continue this line of code and continue execution? Below the problematic line is the problematic line, in context:
if viewinbrowser == "y":
print "I can definitely do that. Loading URL now!"
webbrowser.open_new(url)
print "Exiting..."
sys.exit()
The program does not reach the execution print "Exiting..."that I added because I noticed that for some reason the program did not leave the if statement.
I run this program from the command line if it is important. Edit: I run on Kubuntu 9.04 i386 using KDE 4.3 via backports. I use Firefox 3.5 as the default browser declared in the system settings for KDE, and it is correctly called a program. (At least a new tab opens in Firefox with the right URL, I believe that this is the desired functionality.) / Edit
In addition, I assume that this problem will occur with almost any external call, but I am very new to Python and do not know the terminology for searching on this site. (The search for "python webbrowser" did not bring anything useful.) So, I apologize if it has already been discussed under a different heading!
Any suggestions?