All things Jythonic 2005/1

January 2005
MoTuWeThFrSaSu
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      
Dec
2004
 Feb
2005

A blog tracking jython developments

XML-Image Syndication

XML-Image Comment Feed

Letterimage Contact me

2005-01-24

Brian Zimmers Blog

Brian, now officially working on Jython, has a blog. Also has a nice comments feed.

posted at 10:08:48    #
2005-01-18

Daily Python-URL: Python port of SWT?

Scott Sanders (dotnot) asks: Is anyone working on a port of SWT to Python? Is anyone interested in such a thing?

Of course this is something that is possible today using Jython.  I have configured the RedRobin Jython Eclipse plugin to allow me to easily script SWT (and JFace from Jython ... works like a charm.)  Here is a quick Jython Hello World for SWT.

from org.eclipse.jface.window import *
from org.eclipse.swt import *
from org.eclipse.swt.widgets import *
import sys

class Hello(ApplicationWindow):
  def createContents(self, parent):
  b = Button(parent, SWT.PUSH, widgetSelected=self.helloWorld)
  b.text = "Hello World"
  return b    
  def helloWorld(self, evt):
     print "Hello There ..." 
     sys.exit(0)        
 
w = Hello(None)
w.blockOnOpen = 1
w.open()
Display.getCurrent().dispose()

In order to get this to work in eclipse using the Jython plugin, you need to either create a jython project in eclipse or add the Jython nature to an existing project, add the swt and jface jars into the class path in the project's jython properties and finally set the java.library.path to the location of the swt library also in the project's jython  properties.  This last step is so that swt can find its os native libraries. 

posted at 09:11:12    #
2005-01-17

Brian Zimmer's 'An Introduction to Jython' presentation

Brian Zimmer presented Jython to the Chicago Python Users Group (chipy). Here is a link to his slides.

posted at 21:20:48    #
2005-01-15

And the Winner is: Jython

The Java Republic poll asks"What is Your Scripting Language for Java of the Year 2004?". And the winner with 59% of the votes is Jython!
posted at 22:31:12    #

Use Jython to time Java code

Here is an interesting Jython receipe - Use Jython to time Java code   A clever way to do some low level timing of java functions, all from Jython. 

posted at 01:02:40    #
2005-01-12

Updated Jython Bibliography

I've updated the Jython Bibliography, adding a few new articles and some older ones that were missed before. Please let me know if I've missed any!

posted at 18:34:24    #
2005-01-02

Inline Java code into Jython

This recipe shows how to insert java code into a jython program. The java code is automatically compiled and the resulting class is imported and returned. Compilation only occurs after a change of the java source.
 
posted at 16:30:40    #

Moving Jython Forward: PSF Grant!

Jython has recieved a grant injection from the PSF!  One of the three selected grant proposals deals specifically with revitalizing Jython development and Brian Zimmer will manage the project now called: Moving Jython Forward.

posted at 16:26:24    #
Creative Commons License
This work is licensed under a Creative Commons License.