[SciPy-user] SciPy and GUI

Tim Michelsen timmichelsen@gmx-topmail...
Mon Feb 2 03:04:28 CST 2009


Hello!
  > Answer to 2):
> 
>     Its a question of using the right abstraction level. WxPython is a
[...]
>     thread-safe. In Wx, you will quickly have to understand the fine
>     details of the event loop, which is interesting, but quite off-topic
>     for the scientific programmer.
[...]
>     But the really important thing about Traits is that is folds together
>     a set of patterns and best-practices, such as validation, model-view
>     separation, default-initialization, cheap callbacks/the observer
>     pattern. Using Traits puts you on a good path building a good
>     architecture to your application. If you are using the raw toolkit
Hey, these well formulated explanations really convinced me to look more 
closely into ETS and GUI building!


> However, if you are not programming a reactive application, I would try
> to put as little code as possible in the handler, and put the logics in
> the code following the 'configure_traits' call. If you need to know if
> the user pressed 'OK' or 'Cancel', I would capture this and store it in
> the Handler, but I would put the processing logics later on. That's
> another case of separating the core logics (called 'model') from the
> view-related logics.
This is still something I have to discover closer. I hop to understand 
this once I digg deeper.

> Sure, that's easy: when you specify the traits, you specify its type (in
> the above example it is an int), if the user enters a wrong type, the
> text box turns read, and the corresponding attribute is not changed.
And can there also appear a message like:
Please enter only data of "type"?

>> It maybe of interest for many prospective beginners to see example 
>> applications. Why not listing all accessible applications built with 
>> TraitsUI on a website?
> 
> Most of them are not open source. The open source ones (SciPyLab, Mayavi)
> are fairly complex, and I would advise a beginner to look into them.
> 
>> 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).
> You probably have a point. Documenting a beast like that is not easy,
> believe me :).
I looked at all examples and demos in the ETS folder within the Python 
XY documentation folder.
There are so many. I really think that the spread if ETS could benefit 
from a better advertisement of these demos. Look at the matplotlib 
gallery. The new user could quickly imagine why he/she should ponder 
about using the library.

Thanks again & kind regards,
Timmie



More information about the SciPy-user mailing list