[EMAIL PROTECTED] wrote: >I wrote a jython class bus I can not use it in another jython script > :-( > Example: > ---------------------- X.py---------------------- > class X: > def hello(): > print "Hello" > > > ---------------------- Y.py---------------------- > import X > x = X() > x.hello() > > I get TypeError: call of non function (module 'X') > Both files are in the same directory.
after you've done "import X", the name X refers to the namespace of the module X.py, not the class (or any other object) in that module. to access the class, use dot notation: x = X.X() </F> -- http://mail.python.org/mailman/listinfo/python-list