Hello Gael (numpy friends), I'd love to use Traits and TraitsUI. It looks like a very promising approach. But why is it so difficult to install? If I download the source from http://code.enthought.com/traits/, and follow the instructions in enthought.traits-1.1.0/README, and then run the "code snippet #1" in your tutorial, I get
--- begin error message --- /Users/vallis/Desktop/enthought.traits-1.1.0/enthought/pyface/util/python_stc.py:14: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or activly maintained. Please switch to the wx package as soon as possible. from wxPython.wx import * Traceback (most recent call last): File "prova.py", line 23, in ? camera.configure_traits() File "enthought/traits/has_traits.py", line 1871, in configure_traits File "/Users/vallis/Desktop/enthought.traits-1.1.0/enthought/traits/ui/wx/toolkit.py", line 134, in view_application import view_application File "/Users/vallis/Desktop/enthought.traits-1.1.0/enthought/traits/ui/wx/view_application.py", line 29, in ? from enthought.debug.fbi \ File "/Users/vallis/Desktop/enthought.traits-1.1.0/enthought/debug/fbi.py", line 257, in ? auto_size = False File "/Users/vallis/Desktop/enthought.traits-1.1.0/enthought/traits/ui/editors.py", line 196, in TableEditor return toolkit().table_editor( *args, **traits ) File "/Users/vallis/Desktop/enthought.traits-1.1.0/enthought/traits/ui/wx/toolkit.py", line 514, in table_editor return te.ToolkitEditorFactory( *args, **traits ) File "/Users/vallis/Desktop/enthought.traits-1.1.0/enthought/traits/ui/editor_factory.py", line 55, in __init__ HasPrivateTraits.__init__( self, **traits ) File "enthought/traits/trait_handlers.py", line 172, in error enthought.traits.trait_errors.TraitError: The 'selection_color' trait of a ToolkitEditorFactory instance must be a wx.Colour instance, an integer which in hex is of the form 0xRRGGBB, where RR is red, GG is green, and BB is blue, but a value of black was specified. --- end error message --- BTW, I'm using Python 2.4.4 on Macintel, with wxPython-2.8.0. If I get the latest SVN of the enthought tool suite, go to enthought/src/lib/enthought/traits, and build with python setup.py build_src build_clib build_ext --inplace as suggested in the enthought wiki, and then add enthought/src/lib to my PYTHONPATH, then your snippet fails with --- begin error message --- Traceback (most recent call last): File "prova.py", line 5, in ? class Camera(HasTraits): NameError: name 'HasTraits' is not defined --- end error message --- Last, I see that matplotlib includes some enthought/traits code, but not the ui frontends. Why is that? Is the matplotlib traits usable? As you can see, I'm very confused... if only there was a traits Python egg... Thanks! Michele --- Discussion of Numerical Python <numpy-discussion@scipy.org wrote: You can do a script with a GUI front end, as described in the first > chapter of my tutorial > http://gael-varoquaux.info/computers/traits_tutorial/traits_tutorial.html > . You can also build a complete interactive application, as described in > the rest of the tutorial, but this is more work. > > If you have more questions about this approach feal free to ask. > > Ga�l > > _______________________________________________ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion