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

Vivek
Hello,

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?

-Vivek

---------------------------------------
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]
https://mail.enthought.com/mailman/listinfo/enthought-dev