Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Johannes Buchner <report@bu...> - 2011-09-22 13:45:42
New submission from Johannes Buchner <buchner.johannes@...>:
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/
[user@... 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 *
['List', '__doc__', '__name__', 'org']
Expected: dir should also return Text, Shell, Display, and many more.
title: import * doesn't discover classes
Jython tracker <report@...>