Enthought python - Traits

Ash ashutosh.mishra at gmail.com
Thu Oct 12 15:16:36 EDT 2006


Hello everyone !

I am trying to find some sort of a cookbook or more examples for using
Enthought Traits to build GUI's. I tried to follow the documentations
present at the enthought site, but couldnt get too far - especially on
how to handle a control event ?

Also while i am on the topic:

say i have a list "control" that create using the following two lines:

class Project(HasTraits):
	coordinate_system=Enum('Cartesian','Cylindrical')

I added the following line to get the option selected by the user:

def _coordinate_system_changed(self,old,new):
            print 'System changed from %s to %s ' %(old,new)

but it does not return what the user select. It should return either 0
or 1 based on the two choices, but i can't seem to find a way to trap
that.
I am relatively new to this GUI programming in Python and really could
use some tips/hints.

Thanks,

-Ash




More information about the Python-list mailing list