Issue1762054

classification
Title: add webbrowser module
Type: rfe Severity: normal
Components: Library Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: Arfrever, amak, arjaan, fwierzbicki, juneau001, pjenvey, zyasoft
Priority: high Keywords:

Created on 2007-07-27.15:12:12 by arjaan, last changed 2015-01-22.20:43:42 by zyasoft.

Files
File name Uploaded Description Edit Remove
webbrowser.py juneau001, 2009-10-13.18:56:04 Patch for webbrowser.py
webbrowser.py juneau001, 2014-05-10.14:36:07
Messages
msg3034 (view) Author: arjaan (arjaan) Date: 2007-07-27.15:12:12
Is it possible to add the webbrowser module, so this script can run with jython?


import webbrowser
url = 'http://www.python.org'
webbrowser.open_new(url)
msg3079 (view) Author: Philip Jenvey (pjenvey) Date: 2008-03-10.01:46:36
I'd really like to add the webbrowser module (Paste imports it) but 
unfortunately it's kind of useless without the platform specific ic 
module.

Without ic it will try spawning console browsers on POSIX systems via 
os.system. The problem with that is our os.system can't share the jython 
process's stdin with the child webbrowser process (a limitation of 
Java), so you can't actually use the browser.

Java 1.6 provides similar functionality via java.awt.Desktop.browse. We 
could utilize that (it will refuse to work on a headless environment 
though)
msg5229 (view) Author: Juneau001 (juneau001) Date: 2009-10-13.18:56:03
Implemented open() using java.awt.Desktop as suggested by pjenvey.  This 
patch also includes a special InternetConfig() class in place of using 
ic.  The InternetConfig() class uses the same open() implementation 
making use of the java.awt.Desktop browse method.  This patch has been 
tested on Mac OS X 10.5.8 and Windows XP.  This implementation of the 
webbrowser module has also been tested with the yolk utility.
msg6866 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.20:41:24
Josh, maybe its time to apply your patch?

At least if we can get people using it, we can address any issues that might arise?
msg6906 (view) Author: Juneau001 (juneau001) Date: 2012-03-20.01:21:53
I will re-test the patch under 2.5.3 and OS X 10.7 to ensure that everything still works as expected.  If it is okay then I can commit it.
msg7418 (view) Author: Alan Kennedy (amak) Date: 2012-08-20.23:53:49
Any developments?
msg7419 (view) Author: Juneau001 (juneau001) Date: 2012-08-21.03:08:10
I will test again under 2.7 alpha
msg8373 (view) Author: Juneau001 (juneau001) Date: 2014-05-10.14:36:07
This version of webbrowser.py has been successfully tested using Jython 2.7b2 on OS X 10.9.2 on Java build 1.8.0-b132.
msg9383 (view) Author: Jim Baker (zyasoft) Date: 2015-01-14.02:57:57
Fixed as of https://hg.python.org/jython/rev/a4631c4cb565
History
Date User Action Args
2015-01-22 20:43:42zyasoftsetstatus: pending -> closed
2015-01-14 02:58:10zyasoftsetstatus: open -> pending
resolution: accepted -> fixed
2015-01-14 02:57:57zyasoftsetmessages: + msg9383
2015-01-07 07:35:43zyasoftsetpriority: normal -> high
2014-09-05 16:16:02zyasoftsetassignee: zyasoft
resolution: remind -> accepted
2014-05-10 14:36:09juneau001setfiles: + webbrowser.py
messages: + msg8373
2014-05-10 05:41:13zyasoftsetnosy: + zyasoft
2013-02-19 18:50:33fwierzbickisetresolution: remind
versions: + Jython 2.7, - Deferred
2012-08-21 03:08:11juneau001setmessages: + msg7419
2012-08-20 23:53:49amaksetmessages: + msg7418
2012-06-11 20:48:20Arfreversetnosy: + Arfrever
2012-03-20 01:21:54juneau001setmessages: + msg6906
2012-03-19 20:41:24amaksetnosy: + amak
messages: + msg6866
2009-10-13 18:56:06juneau001setfiles: + webbrowser.py
messages: + msg5229
2009-10-11 14:57:10juneau001setnosy: + juneau001
2009-03-14 03:04:53fwierzbickisetversions: + Deferred
2008-12-15 19:00:50fwierzbickisetcomponents: + Library, - None
2008-11-03 20:59:39fwierzbickisetnosy: + fwierzbicki
2008-03-10 01:46:36pjenveysetnosy: + pjenvey
messages: + msg3079
2007-07-27 15:12:12arjaancreate