[Python-bugs-list] [ python-Bugs-816810 ] webbrowser.open hangs
under certain conditions
SourceForge.net
noreply at sourceforge.net
Thu Oct 2 17:00:19 EDT 2003
Bugs item #816810, was opened at 2003-10-02 23:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=816810&group_id=5470
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Sjoerd Mullender (sjoerd)
Assigned to: Nobody/Anonymous (nobody)
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...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=816810&group_id=5470
More information about the Python-bugs-list
mailing list