[AstroPy] STScI update

Perry Greenfield perry at stsci.edu
Tue Feb 3 13:58:11 CST 2004

> Hi,
> Have you considered changing GUI toolkits?  Tk and it's lame brother 
> tcl are starting to show their age.  With all the work done on many 
> desktop platforms to produce a unified visual appearance Tk widgets 
> stick out like a sore thumb.  And then there is the fact that python, 
> in the spirit of simplicity and elegance, would benefit from removing 
> dependencies on that other scripting language.  System administrators 
> and installers everywhere will cheer.
> PyGTK <http://www.daa.com.au/~james/software/pygtk/> is quite 
> excellent but requires GTK.  GTK is available for OS X and Win32 but 
> is not commonly used.
> Something like wxPython <http://www.wxpython.org/> is cross platform 
> and uses the platform native toolkit (and toolkit themes).  GTK2 on 
> unix. Apple ships a version of this with OS X 10.3.  wxPython also has 
> a wxGLCanvas object that may be useful.
> Cheers,
> Jon

We are open to other toolkits, but the features of the toolkit aren't 
the biggest driver in our decision. The ease of installation is our 
concern. For example, wxWindows is considered by many to be much nicer 
certainly more modern) than Tkinter, but can be a bear to install on 
(more accurately, the problem is with the required packages, e.g, gtk). 
OpenGL has wonderful features but has entailed many installation 
hassles. That's
why we've moved away from it in the latest version of PyRAF.

These issues may go away if Solaris dies as a platform, but currently, 
it's one
we need to support.

There is one other aspect of Tkinter that makes it unusual. It, unlike 
any other
gui toolkit, doesn't require using mainloop while working from a 
terminal window
(apparently the python interpreter loop somehow does what mainloop 
does). This
is a handy aspect of Tkinter that makes it usable for the command line. 
you either force use of a threaded solution (which entails its own 
problems) or
force users to use a gui-based shell window for their commands. 
wxPython is
very easy to crash from the interactive prompt, by the way (you can 
or hang the python process) which is another reason we are 
uncomfortable using it.

If using graphics from a terminal were the only reason, it probably 
would not
prevent us from switching to another toolkit. The primary reason is 

Perry Greenfield

AstroPy mailing list  -  astropy at stsci.edu

More information about the AstroPy mailing list