Message6650

Author j13r
Recipients j13r
Date 2011-09-22.13:45:33
SpamBayes Score 9.132846e-09
Marked as misclassified No
Message-id <1316699133.91.0.610430465241.issue1799@psf.upfronthosting.co.za>
In-reply-to
Content
I have the issue that 

> from org.eclipse.swt.widgets import *

doesn't work. To be exact, it doesn't discover anything.
It fails, unless I have something like 
> import org.eclipse.swt.widgets.List
before it, in which case it imports "List" into the namespace, but nothing else.

Clearly, the code is in the classpath, and it can be imported. But it isn't automatically discovered. This seems to be a bug in the latest Jython release.

To test, download the right SWT jar from http://www.eclipse.org/swt/
Then run:

[user@localhost tmp]$ JYTHONPATH=swt-gtk.jar java -jar /home/user/.m2/repository/org/python/jython-standalone/2.5.2/jython-standalone-2.5.2.jar 
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) 
[OpenJDK Server VM (Sun Microsystems Inc.)] on java1.6.0_22
Type "help", "copyright", "credits" or "license" for more information.
>>> import org.eclipse.swt.widgets.List
>>> from org.eclipse.swt.widgets import *
>>> dir()
['List', '__doc__', '__name__', 'org']
>>> 

Expected: dir should also return Text, Shell, Display, and many more.
History
Date User Action Args
2011-09-22 13:45:33j13rsetrecipients: + j13r
2011-09-22 13:45:33j13rsetmessageid: <1316699133.91.0.610430465241.issue1799@psf.upfronthosting.co.za>
2011-09-22 13:45:33j13rlinkissue1799 messages
2011-09-22 13:45:33j13rcreate