[Patches] [ python-Patches-754022 ] Greatly enhanced webbrowser.py
SourceForge.net
noreply at sourceforge.net
Thu Sep 15 21:49:41 CEST 2005
Patches item #754022, was opened at 2003-06-13 17:24
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=754022&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
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: Greatly 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: Reinhold Birkenfeld (birkenfeld)
Date: 2005-09-15 21:49
Message:
Logged In: YES
user_id=1188172
Ah, thanks. I had already corrected #1, but didn't look
closely enough for #2.
----------------------------------------------------------------------
Comment By: George Yoshida (quiver)
Date: 2005-09-15 19:26
Message:
Logged In: YES
user_id=671362
Let me point out two problems:
o NameError
if remote_background:
cmd += ' &'
=>
if self.remote_background: # add "self."
cmd += ' &'
o copy and paste mistake?
\lineiii{'mozilla'}{\class{Mozilla('mozilla')}}{}
\lineiii{'firefox'}{\class{Mozilla('mozilla')}}{}
=>
\lineiii{'mozilla'}{\class{Mozilla('mozilla')}}{}
\lineiii{'firefox'}{\class{Mozilla('firefox')}}{}
----------------------------------------------------------------------
Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-09-15 10:07
Message:
Logged In: YES
user_id=1188172
Adding new patch (webbrowser.diff), enhanced with other
patches and bugfixes here on SF.
Also updated the docs with changed/added notes.
Please review, I'll apply this for 2.5.
----------------------------------------------------------------------
Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-01 18:33
Message:
Logged In: YES
user_id=1188172
I have reviewed this one too, and I really recommend to
apply it for 2.5.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-30 13:02
Message:
Logged In: YES
user_id=4799
Added Opera controller to the doc.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-30 13:01
Message:
Logged In: YES
user_id=4799
Added remote functionality for Opera on Unix.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-29 10:50
Message:
Logged In: YES
user_id=4799
Updated documention patch - added a section about webbrowser
script and its command-line options and arguments.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-29 10:48
Message:
Logged In: YES
user_id=4799
Changed _isexecutable() on w32 to test for executable
extensions (.exe, bat) . Tested on Linux with
Mozilla/links/elinks; on w32 with Mozilla/Opera/Firefox.
----------------------------------------------------------------------
Comment By: Rodrigo Dias Arruda Senra (rodsenra)
Date: 2005-03-28 23:25
Message:
Logged In: YES
user_id=9057
I have revised: libwebbrowser.tex.patch and
webbrowser.py.patch.
They are Ok, I recommend to apply both. Outstanding work.
However, I would withdraw the webbrowser wrapper script,
since the same functionality can be accomplished with:
python -m webbrowser http://www.python.org
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-28 16:21
Message:
Logged In: YES
user_id=4799
Patch for documentation.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-28 16:19
Message:
Logged In: YES
user_id=4799
Minor bugfix.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2005-03-24 14: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 14: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-23 22: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-23 22: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-23 22: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 20: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 19: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 12: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 08:11
Message:
Logged In: YES
user_id=80475
Too late for Py2.4.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2004-10-07 09: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