Jython Pythonpath question

M

Mark Fink

Hi there,

I have a source file FailFixture.py in the folder
D:\AUT_TEST\workspace\JyFIT\testutil. Now I want to import the file
with "import testutil.FailFixture". Unfortunately I could not figure
out how to set this up. I am convinced that
"D:\AUT_TEST\workspace\JyFIT" should be included in the pythonpath but
it does not work. Nor does it work to include this path in the java
classpath. Any idea whats wrong?

I experiented a little at the Jython prompt:

D:\AUT_TEST>java -Dpython.home=D:\AUT_TEST\Jython21
-Dpython.path=D:\AUT_TEST\workspace\JyFIT -classpath
D:\AUT_TEST\Jython21\jython.jar;D:\AUT_TEST\JavaLib\log4j-1.2.13.jar;D:\AUT_TEST\workspace\JyFIT
org.python.util.jython

Jython 2.1 on java1.5.0_06 (JIT: null)
Type "copyright", "credits" or "license" for more information.Traceback (innermost last):
 
K

Kent Johnson

Mark said:
Hi there,

I have a source file FailFixture.py in the folder
D:\AUT_TEST\workspace\JyFIT\testutil. Now I want to import the file
with "import testutil.FailFixture". Unfortunately I could not figure
out how to set this up. I am convinced that
"D:\AUT_TEST\workspace\JyFIT" should be included in the pythonpath but
it does not work. Nor does it work to include this path in the java
classpath. Any idea whats wrong?

Do you have a file D:\AUT_TEST\workspace\JyFIT\testutil\__init__.py ?

Kent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top