eclipse vs traits question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

eclipse vs traits question


I have eclipse + PyDev configured as my IDE. When I try running this code below from command line, it works fine. But when I run it from the IDE, I get this error below.

Any suggestions on what to do?


from traits.api import HasStrictTraits, File

class MyClass(HasStrictTraits):
   logFileName = File

if __name__ == "__main__":
    c = MyClass(logFileName='C:\work\log_raw.txt')


traits.trait_errors.TraitError: The 'logFileName' trait of a MyClass instance must be a file name, but a value of 'C:\\work\\log_raw.txt' <type 'str'> was specified.

Enthought-Dev mailing list
[hidden email]