jython include import
02/23/2007
Leave a comment
==file: foo.py
class foo:
def hello(self):
print 'hello foo'
==file: bar.py
import foo
f = foo()
print f.hello()
at command prompt:
jython bar.py
prints:
hello foo
For the mechanics of how jython finds foo.py, see
"The Module Search Path" at
http://www.python.org/doc/current/tut/node8.html#SECTION008110000000000000000
file extension must be .py
Categories: Uncategorized