webbrowser module reveals a Netscape bug.
Martin Franklin
martin.franklin at westerngeco.com
Fri Jul 6 06:18:52 EDT 2001
Good to hear you got a fix you may want to consider Opera
here is a webbrowser opera class......(relativly untested)
from webbrowser import *
class Opera:
def _remote(self, action):
cmd = "opera -remote '%s' >/dev/null 2>&1 &" % (action)
rc = os.system(cmd)
if rc:
import time
os.system("opera &")
time.sleep(PROCESS_CREATION_DELAY)
rc = os.system(cmd)
return not rc
def open(self, url, new=0):
if new:
self.open_new(url)
else:
self._remote("openURL(%s)" % url)
def open_new(self, url):
self._remote("openURL(%s, new-window)" % url)
register("opera", Opera)
Gary Herron wrote:
>
> Right on! A search of the archive found
> http://lists.debian.org/debian-kde-0107/msg00040.html
> which explains the problem and give a solution.
>
> Thanks.
>
> On Thursday 05 July 2001 13:33, Siggy Brentrup wrote:
> > Hi Gary,
> >
> > If you're running KDE 2.1: I remember a message including
> > a workaround on the debian-kde mailing list the day
> > before.
> >
> > Gary Herron <gherron at islandtraining.com> writes:
> > > I'm writing an application which needs to open a web
> > > browser on any platform, so I used the webbrowser
> > > module, and it fails to work on my first system test
> > > because of an apparent bug in netscape. I've not seen
> > > any mention of this problem, but I'm hoping someone has
> > > a workaround.
> >
> > Since I don't use Netscape 4.7x any more, I don't have
> > the message at hand, search the archive at
> >
> > http://lists.debian.org/debian-kde-0107/maillist.html
> >
> > for netscape in the subject line.
> >
> > Good luck
> > Siggy
More information about the Python-list
mailing list