[SciPy-user] SciPy and GUI

Tim Michelsen timmichelsen at gmx-topmail.de
Sun Feb 1 15:48:32 EST 2009


Hello,
Some ideas on adding a GUI to scientif scripts can be found in the 
following book:
Python Scripting for Computational Science, by H. P. Langtangen.
http://folk.uio.no/hpl/scripting/

I am currently as well at a point within my developments where user 
interaction is needed.
Currently, I see three options with different levels of complexity.

1) use commandline (OptParse) with config files
2) add some simple GUIs that pop up where user input is needed.
3) code a real GUI with a Toolkit.


> I would use traits (see
> http://code.enthought.com/projects/traits/documentation.php, and
> http://code.enthought.com/projects/traits/docs/html/tutorials/traits_ui_scientific_app.html
> for documentation and a tutorial)
I read your tutorial.
I think it is one of the best I read that are targeting non-programmer 
scientists who need to to task specific coding. Your Physics Lab 
background shows that you know the difficulties of your readers. Well done!
I shows that GUIs can be created with as little overhead code as possible.

Nevertheless, I have some questions:


* Where is the "science" in TraitsUI? (Why do you call it a scientific GUI?)
	 E.g. I could also build a Wizard directly with wxPython. So why with 
Traits?

* I tried the examples.
What I did not understand is how one can control the buttons below the 
Traits objects.
For the first example (section "An object and its representation"), 
there are 6 buttons in your image:
Undo, Redo, Revert, OK, Cancel, Help.
When I execute the code I only get OK, Cancel.

May you tell how or where to find information how buttons can be contolled?

* Input validation: I remember to have seen a example where a Traits
Window was used to validate (numeric) input. If the user puts in invalid 
numers, it would turn read.. Do you know about this?

* Is there a feature roadmap for traits?
I would like to know where you intend it to develop it to before I 
settle on it.

Others users may also be interested, so I relink to an earlier post:
example application for a starter with TraitsUI
http://thread.gmane.org/gmane.comp.python.enthought.devel/18246

It maybe of interest for many prospective beginners to see example 
applications. Why not listing all accessible applications built with 
TraitsUI on a website?

I think that Enthought should put a strong pointer on their website 
(http://code.enthought.com/) indicating that actually a lot of 
documentation can also be found on the Trac wiki 
(https://svn.enthought.com/enthought/wiki).

Kind regards,
Timmie






More information about the SciPy-User mailing list