Issue1762054

classification
Title: add webbrowser module
Type: rfe Severity: normal
Components: Library Versions: Deferred
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: arjaan, fwierzbicki, juneau001, pjenvey
Priority: normal Keywords:

Created on 2007-07-27.15:12:12 by arjaan, last changed 2009-10-13.18:56:06 by juneau001.

Files
File name Uploaded Description Edit Remove
webbrowser.py juneau001, 2009-10-13.18:56:04 Patch for webbrowser.py
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.
History
Date User Action Args
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