[Patches] [ python-Patches-754022 ] Enhanced webbrowser.py

SourceForge.net noreply at sourceforge.net
Mon Mar 28 16:19:39 CEST 2005


Patches item #754022, was opened at 2003-06-13 19:24
Message generated for change (Comment added) made by phd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=754022&group_id=5470

Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Oleg Broytmann (phd)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Enhanced webbrowser.py

Initial Comment:
The patch enhances webbrowser.py.

First, all calls to os.system return result code, and
the inverse of the code (it is ok/fail status) passed
through all higher-level routines up to top-level call
to open(url). This allows to check if a browser was
really started.

Second, the very open() modified so it is now trying to
run all registered browsers in order until a browser
returns 1.

Third, the file can be used as a program: webbrowser.py
url. Optional parameters -n allows to open the url in a
new window.


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

>Comment By: Oleg Broytmann (phd)
Date: 2005-03-28 18:19

Message:
Logged In: YES 
user_id=4799

Minor bugfix.

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

Comment By: Oleg Broytmann (phd)
Date: 2005-03-24 16:30

Message:
Logged In: YES 
user_id=4799

Do not report error if the browser doesn't support tabs -
just open the URL in a new window.

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

Comment By: Oleg Broytmann (phd)
Date: 2005-03-24 16:14

Message:
Logged In: YES 
user_id=4799

I've reworked the patch once more. I moved some common
functionality into the UnixBrowser class and added two new
features - Elinks launcher class (elinks supports remote
commands in a manner very similar to Mozilla) and new-tab
functionality for browsers that support tabbed browsing
(Mozilla and elinks); a user can now run "webbrowser -t URL"
to open the URL a new tab. All classes in the module are now
new-style classes (except for the Error class).

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

Comment By: Oleg Broytmann (phd)
Date: 2005-03-24 00:18

Message:
Logged In: YES 
user_id=4799

Uploading webbrowser wrapper script. Put it into
Tools/scripts directory, and add to the end of setup.py.

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

Comment By: Oleg Broytmann (phd)
Date: 2005-03-24 00:17

Message:
Logged In: YES 
user_id=4799

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

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

Comment By: Oleg Broytmann (phd)
Date: 2005-03-24 00:14

Message:
Logged In: YES 
user_id=4799

I've moved script code to main() function.

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

Comment By: Rodrigo Dias Arruda Senra (rodsenra)
Date: 2005-03-23 22:25

Message:
Logged In: YES 
user_id=9057

I have reviewed this patch in 2005-03-23 and recommend it to
be applied ! 

Oleg have made the comments below to Python-dev, and those
must be taken into consideration while applying this patch.

http://python.org/sf/728278
   Close with resolution "partially applied, partially
rejected".

http://python.org/sf/754022
   Review and apply! ;)

http://python.org/sf/1166780
   Close with resolution "applied". (Though it was not
applied in
exactly that form...)

http://python.org/sf/1077979
   Close with resolution "applied long ago".

http://python.org/sf/1144816
   Close with resolution "duplicate of 1077979".


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

Comment By: Oleg Broytmann (phd)
Date: 2005-03-23 21:06

Message:
Logged In: YES 
user_id=4799

I've consolidated patches 728278, 754022, 954628, 1166780
into this single patch. Some parts of those patches were
applied, some rejected, many things changed. I also added
elinks support - currently it is very similar to links.

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

Comment By: Oleg Broytmann (phd)
Date: 2004-12-07 14:23

Message:
Logged In: YES 
user_id=4799

Applied the patch from http://python.org/sf/1077979.

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

Comment By: Raymond Hettinger (rhettinger)
Date: 2004-10-20 10:11

Message:
Logged In: YES 
user_id=80475

Too late for Py2.4.

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

Comment By: Oleg Broytmann (phd)
Date: 2004-10-07 11:48

Message:
Logged In: YES 
user_id=4799

And don't forget to make it executable.

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

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


More information about the Patches mailing list