我有一个需要包含类的jython脚本(在本例中为JUnit)。我在“some/path/junit.jar”中找到了junit jar。我的脚本是:在jython中导入的类
from junit.textui import TestRunner
TestRunner.Main(["name of some class here"])
我跑这样的:
java -cp "some/path/junit.jar" -jar jython.jar script.py
但抱怨说:
from junit.textui import TestRunner
ImportError: No module named junit
我怎样才能使它看到/导入正确的类?
Jython链接为那些从来没有听说过这样的人:http://en.wikipedia.org/wiki/Jython和http://www.jython.org/ – 2009-09-16 11:43:39