tags:

views:

195

answers:

1

getting

Traceback (most recent call last): File "C:\projects\myproject\convert.py", line 139, in import optparse ImportError: No module named optparse.

when executing it using jython. Same module works fine when i execute it through python.

I am usinng window7 operating system. The same modle works fine on windows XP machine with both python and Jython.

+1  A: 

My guess is that you're using Jython 2.2, which, according to the FAQ:

Jython 2.2 does not implement any features added to CPython in version 2.3 or later.

Where optparse was added in Python 2.3.

The newest version of Jython is 2.5.1, so you'll probably want to go ahead and download it.

Mark Rushakoff
Yes download it NOW !
Blauohr