[Pythonmac-SIG] GUI Alternatives: supplemental comments on Jython

Daniel Lord dano@brightfire.com
Wed, 4 Jul 2001 08:27:37 -0700


--Apple-Mail-289481326-1
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	format=flowed;
	charset=us-ascii

On Tuesday, July 3, 2001, at 09:01 AM, pythonmac-sig-request@python.org 
wrote:

>> Some limitations include:
>> - GUI projects are in a sad state. The only standard GUI library
>> ported to Mac OS is Tkinter, and it doesn't work perfectly (though is
>> fine for basic stuff). The IDE doesn't work with Tkinter, resulting
>> in a slow and clumsy development cycle.

Just an FYI to round out the GUI comments.
Someone has probably pointed this out before, but for anyone who knows 
Java, Jython, the Python interpreter that runs in a Java 2 VM, is an 
excellent  GUI alternative for traditional Python GUIs on OSX. Java 2 of 
course uses Aqua so XDarwin isn't required and the screen contention 
issues between X and Aqua are eliminated. I still cannot get rootless X 
running flawlessly (the window borders disappear  and the menu 
characters are wrong and unreadable) with XFree86 4.1 though it sort of 
works :-(.

While the learning curve is a little steep (no worse than Tkinter 
though), it uses the full capability of Java as far as I can tell. Once 
you understand the syntax to call Java from Jython, you have all of Java 
available as far as I can tell so far. I can use GridBagLayout (as well 
as the other layout managers) and the full suite of Swing components. I 
have created event listeners for lsits, button, windows, etc.--so it 
really is  pretty complete implementation. Of course you can run plain 
Python through as well. Documentation is sparse ( I hope to contribute 
in someway soon), but the sig archives are very helpful.

Full Python support is incomplete, particularly where C code is 
involved, Numeric for instance (although someone has a JNumrice prot in 
Java of Numeric that is supposed to be good). Serial port access or env 
vars require JNI.

One can also call Java from Jython including jars and invoke Jython from 
Java. One can also include a single Python program in a jar along with 
Java that is the first thing invoked. As Java support is strengthened on 
OSX (I've uncovered a few cosmetic bugs but no show-stoppers yet), 
Jython may prove to be the most portable way to use Python most of the 
time (some Java limitations like no direct access to env do get in the 
way sometimes). Overall though I use Jython more than Python now, 
particularly since I can call JavaBeans  and jars from Jython. It isn't 
a perfect replacement (there never is) but if Tkinter/X is problematic 
for you, have a look you might be pleasantly surprised. Of course the 
IDE for Python is useless, but I like it nonetheless.

http://www.jython.org
Jython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/jython-users

--Apple-Mail-289481326-1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=us-ascii

On Tuesday, July 3, 2001, at 09:01 AM,
pythonmac-sig-request@python.org wrote:


<excerpt><excerpt>Some limitations include:

- GUI projects are in a sad state. The only standard GUI library

ported to Mac OS is Tkinter, and it doesn't work perfectly (though is

fine for basic stuff). The IDE doesn't work with Tkinter, resulting

in a slow and clumsy development cycle.

</excerpt></excerpt>

Just an FYI to round out the GUI comments.

Someone has probably pointed this out before, but for anyone who knows
Java, Jython, the Python interpreter that runs in a Java 2 VM, is an
excellent  GUI alternative for traditional Python GUIs on OSX. Java 2
of course uses Aqua so XDarwin isn't required and the screen
contention issues between X and Aqua are eliminated. I still cannot
get rootless X running flawlessly (the window borders disappear  and
the menu characters are wrong and unreadable) with XFree86 4.1 though
it sort of works :-(.=20


While the learning curve is a little steep (no worse than Tkinter
though), it uses the full capability of Java as far as I can tell.
Once you understand the syntax to call Java from Jython, you have all
of Java available as far as I can tell so far. I can use GridBagLayout
(as well as the other layout managers) and the full suite of Swing
components. I have created event listeners for lsits, button, windows,
etc.--so it really is  pretty complete implementation. Of course you
can run plain Python through as well. Documentation is sparse ( I hope
to contribute in someway soon), but the sig archives are very helpful.


Full Python support is incomplete, particularly where C code is
involved, Numeric for instance (although someone has a JNumrice prot
in Java of Numeric that is supposed to be good). Serial port access or
env vars require JNI.=20


One can also call Java from Jython including jars and invoke Jython
from Java. One can also include a single Python program in a jar along
with Java that is the first thing invoked. As Java support is
strengthened on OSX (I've uncovered a few cosmetic bugs but no
show-stoppers yet), Jython may prove to be the most portable way to
use Python most of the time (some Java limitations like no direct
access to env do get in the way sometimes). Overall though I use
Jython more than Python now, particularly since I can call JavaBeans=20
and jars from Jython. It isn't a perfect replacement (there never is)
but if Tkinter/X is problematic for you, have a look you might be
pleasantly surprised. Of course the IDE for Python is useless, but I
like it nonetheless.


http://www.jython.org

<fixed><smaller>Jython-users@lists.sourceforge.net

=
<underline><color><param>1A1A,1A1A,FFFF</param>http://lists.sourceforge.ne=
t/lists/listinfo/jython-users</color></underline>

</smaller></fixed>=

--Apple-Mail-289481326-1--