[Patches] [ python-Patches-484847 ] Support for OS/2 in webbrowser.open(url)

noreply@sourceforge.net noreply@sourceforge.net
Sat, 24 Nov 2001 07:37:44 -0800


Patches item #484847, was opened at 2001-11-23 04:32
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=484847&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Stefan Schwarzer (sschwarzer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Support for OS/2 in webbrowser.open(url)

Initial Comment:
Added rudimentary support for the webbrowser module to launch URLs with Netscape on OS/2
(the there by far most installed browser).

----------------------------------------------------------------------

>Comment By: Stefan Schwarzer (sschwarzer)
Date: 2001-11-24 07:37

Message:
Logged In: YES 
user_id=383516

The Netscape class doesn't seem to work on OS/2 because the class is too Unix-centric.
This works:
>>> import os
>>> os.system('e:/netscape/program/netscape.exe http://www.python.org/')
0
while this does not:
>>> ns = webbrowser.Netscape('e:/netscape/program/netscape.exe')
>>> ns.open('http://www.python.org/')
SYS0003: The system cannot find the path specified.
SYS0003: The system cannot find the path specified.
It seems, Netscape on OS/2 is a different thing that the Unix version; e. g. it doesn't understand the
Unix options. For example,
>>> os.system('e:/netscape/program/netscape.exe -raise http://www.python.org/')
0
"works" but "-raise" seems to be interpreted as an URL; the above call starts Netscape with the
(smartbrowsing-generated) URL 
http://keyword.netscape.com/kwserr.tmpl?kw=%2Draise+http%3A%2F%2Fwww%2Epython%2Eorg%2F
Turning "off"(?) smartbrowsing gives
http://search.netscape.com/search.psp?cp=clkussrp&charset=UTF-8&search=-raise+http//www.python.org/
which is also not what I want. ;-) 
-remote doesn't work either.

Because of these problems I thought it would be the easiest to use the GenericBrowser class, assuming
that most or all of the special functionality of the Netscape class doesn't work.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-11-24 01:45

Message:
Logged In: YES 
user_id=21627

Why doesn't this use the Netscape class? Is the -remote
feature working on OS/2?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=484847&group_id=5470