[SciPy-user] Traits: Problem with my first example.

Donald 'Paddy' McCarthy paddy3118 at netscape.net
Wed May 7 03:33:18 EDT 2003


Thanks Dave.
I only ask because I am looking into using traits as the main part of my 
GUI for an application that can be thought of as a large set of 
properties, irganised into hierarchical groups with interdependancies. 
The properties  will be used to configure a chip, (what peripherals are 
allowed, configuraton for allowed peripherals etc).

Part of the problem is that several engineers know how to configure 
their part of chip but may not want to use the GUI . It would just save 
me time I guessif you had a text format but I can adapt something like 
YAML or the config parser.

Cheers, Paddy.


dmorrill at enthought.com wrote:

>Paddy:
>
>Sorry for not seeing this sooner, I mainly monitor the scipy-chaco mailing
>list.
>
>I tried you sample program, and it seems OK, but fails for me also. I
>suspect that somewhere along the line a bug or incompatibility  was
>introduced in the traits code. I'll look into it.
>
>Also, the file the results are saved in is a standard Python pickle, not a
>text file. As it stands, the file is not intended to be edited by humans,
>although this could be changed...
>
>Dave Morrill
>
>----- Original Message -----
>From: "Donald 'Paddy' McCarthy" <paddy3118 at netscape.net>
>To: <scipy-user at scipy.net>
>Sent: Saturday, April 19, 2003 7:27 AM
>Subject: [SciPy-user] Traits: Problem with my first example.
>
>
>  
>
>>Hi,
>>I have just found out about traits and tried out the following example:
>>
>>############
>>from traits import *
>>
>>class Person ( HasTraits ):
>>  __traits__ = {
>>    'name': '',
>>    'age': 9,
>>    'weight': 0.0
>>  }
>>
>>bill = Person()
>>
>>#bill.configure_traits( filename = None, edit = 1, traits = None )
>>bill.configure_traits( filename = 'xx.save', edit = 1 )
>>bill.edit_traits()
>>#############
>>
>>
>>When run (Windows XP, wxwindows), the gui pops up as expected, but when
>>I save my changes the program exits with the following error:
>>
>>C:\Documents and Settings\Paddy\My Documents>python -V
>>Python 2.2.2
>>
>>C:\Documents and Settings\Paddy\My Documents>python traitScript1.py
>>09:22:58: Debug: c:\projects\wx\src\msw\app.cpp(439):
>>    
>>
>'UnregisterClass(canvas)'
>  
>
>>failed with error 0x00000584 (class still has open windows.).
>>
>>Can you tell me what I am doing wrong?
>>
>>Also, the file of trait values generated is not editable text, is their
>>a reason for this?
>>
>>Thanks.,  Paddy.
>>
>>
>>_______________________________________________
>>SciPy-user mailing list
>>SciPy-user at scipy.net
>>http://www.scipy.net/mailman/listinfo/scipy-user
>>    
>>
>
>_______________________________________________
>SciPy-user mailing list
>SciPy-user at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-user
>  
>

-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop at Netscape! 
http://shopnow.netscape.com/





More information about the SciPy-User mailing list