Bugs item #816810, was opened at 2003-10-02 14:00 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=816810&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 >Status: Closed >Resolution: Out of Date Priority: 5 Submitted By: Sjoerd Mullender (sjoerd) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: webbrowser.open hangs under certain conditions Initial Comment: On Unix, if you have galeon installed and no BROWSER environment variable, webbrowser.open('http://...') will hang if there is no galeon running at the time of the call. The problem is, webbrowser.open calls "galeon <the URL>". If a galeon instance is running, the new invocation will signal the old about the URL and then exit. If there is no galeon instance running, the new instance will do the job itself and not exit, so the call to webbrowser.open() will hang until you exit galeon. Skip had this to say: In the meantime, it looks like if you modify the definition of cmd in Galeon._remote to cmd = "%s %s %s & >/dev/null 2>&1" % (self.name, raise_opt, action) that webbrowser.open() should return for you. I'm not sure the '&' is sufficient though. You may lose the Galeon instance if you then exit from the Python interpreter. In general, the code in webbrowser._remote() looks a bit hackish. I'm not sure I like this: rc = os.system(cmd) if rc: import time os.system("%s >/dev/null 2>&1 &" % self.name) time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) Oh well, it's what we're stuck with... ---------------------------------------------------------------------- >Comment By: Neal Norwitz (nnorwitz) Date: 2005-12-18 19:39 Message: Logged In: YES user_id=33168 webbrowser was pretty much re-written, so I'm assuming this is at least out of date, and hopefully fixed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=816810&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com