5/21/2023 0 Comments Mozilla macI really would like webbrowser to open up the URL in an existing tab/window of Firefox, if it's already running, or in a new Firefox is not already running. I tried using webbrowser.get("/Applications/Firefox.app/Contents/MacOS/firefox %s") which starts up a new instance of Firefox then complains that another instance of Firefox is already running. Webbrowser.Error: could not locate runnable browserįirefox is there. Raise Error("could not locate runnable browser") Under Python 2.5, 2.6, and 2.7 (from version control) I get this: > import webbrowserįile "/Library/Frameworks/amework/Versions/2.5/lib/python2.5/webbrowser.py", line 46, in get ![]() I want to see it in Firefox, since I do have Firefox. The above code started the new URL (on localhost) in Safari. I have Safari on my Mac as the default, but I also have Firefox installed and running. Print('Please open %s in Firefox.' % url) It starts the web application with the following: try: ![]() I'm testing a Python program (Crunchy Python) which sets up a web server then uses Firefox for the front end. ![]() I think what I need here is to know which magic command-line or OSA script program to run to start up a URL in an existing Firefox browser, if one is running, or to also start up Firefox if it isn't.
0 Comments
Leave a Reply. |