[Tutor] Dynamically changing a class
Eike Welk
eike.welk at gmx.net
Thu Sep 6 19:12:16 CEST 2007
On Wednesday 05 September 2007 16:59, Jason Doege wrote:
> Thanks for the good and useful information on this. Now for the
> why...
>
> I am building an API and for various reasons I have chosen Python
> to implement it. I'd like to separate the implementation from the
> interface as, for instance, C++ does with separate .hpp and .cpp
> files. Apart from defining a class with a bunch of empty methods
> and then redefining them, I have not seen a good way to do this in
> Python. Can you recommend the Pythonic way to do this?
>
If you want to describe the data and validate it, Enthought traits may
be interesting for you:
http://code.enthought.com/traits/
They additionally have a library that can automatically generate a
graphical user interface to change the data of a traits using class.
Regards,
Eike.
More information about the Tutor
mailing list