I have imported the Jython2.5.1 standalone jar into my build path in Eclipse. Whenever I run any Jython code from within Eclipse, that uses the os.path module, the app barfs:
'Execution failed. Traceback (most recent call last):
File "<string>", line 1, in <module>
File "../lib/python/threading.py", line 6, in <module>
import traceback
File "../lib/python/traceback.py", line 3, in <module>
import linecache
File "../lib/python/linecache.py", line 9, in <module>
import os
File "../lib/python/os.py", line 132, in <module>
from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep, devnull
ImportError: cannot import name curdir'
The code on line 132 in os.py and the previous couple lines are:
if _name == 'nt':
import ntpath as path
else:
import posixpath as path
sys.modules['os.path'] = _path = path
from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep, devnull
I think this is a problem with os.path, and not curdir, but I have no idea how to fix it. I am running the app with the paramter -Dpython.home=.. in the eclipse run config. I'm running this on linux.
Thanks