Catching webbrowser error in RedHat

Lance lbrannma at cablespeed.com
Sun Mar 30 13:24:56 EST 2003


Hi All,

I'm running Python 2.2 under RedHat8. I use webbrowser to open an html file
in a browser window. This is my code:

        try:
            webbrowser.open(fname)
        except:
            print "ERROR: "+fname+" not found."

1. A Redhat "splash" screen shows for a few seconds prior to my desired
screen when try block is successful. Can this splash screen be disabled?

2. If the try block is not successful, the Redhat splash screen shows,
followed by an ugly system message box saying that the file could not be
found. I want only the message in my except clause to display, not the
system message.

Any suggestions for dealing with this issue will be greatly appreciated. It
appears that the splash screen problem does not exist in Mandrake.

Thanks,
Lance






More information about the Python-list mailing list