[Tutor] [Q] Newbie's question on Python graphics

dman dsh8290@rit.edu
Tue, 21 Aug 2001 12:50:57 -0400

On Tue, Aug 21, 2001 at 11:07:41AM -0700, Young-Jin Lee wrote:
| Hi, all. I'm new to Python and I have a question on the Python
| graphics.

It depends on what you mean by "graphics".

| Most of the document I read doesn't tell much about graphics
| programming. I need a kind of 2D drawing functionality, drawing a
| line, circle, and oval, translate them, and rotate them. Is there a
| good tutorial or whatever for this topic?

This sounds like you are talking about GUI toolkit functionality,
rather than graphic (ie JPEG) manipulation.  Most python docs won't
talk much about GUIs because there are many different toolkits that
can be used from Python.

| I also need to know if a Java application can call these drawing
| method through the imbedded Python (Jython module). I heard if the
| drawing routine or any Python routine is dependent on any C API, a
| Java application cannot use it through the imbedded Python. 

If you are using Jython then you can only use stuff that is pure
python or accessible from Java.  Most of python's extensions (and most
GUI toolkits too) depend on some C stuff and aren't naturally
accessible from Java.  The most natural GUI toolkit to use from
Java/Jython is Swing.  See


for more details on swing.