[Tutor] ImportError: No module named klg..
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Mon Jan 5 14:06:58 EST 2004
On Mon, 5 Jan 2004 Vishwavasu.Chobari at utstar.com wrote:
> I am Vishwa working with JCChart to create a PIE chart. I have the
> following two lines in my code to use JCChart.
>
> from com.klg.jclass.chart import *
> from com.klg.jclass.chart.JCChart import *
>
> Despite setting the python.path, python.home, sys.path et al to the jar
> file that contains these classes, I get the error -
>
>
> 01/05/2004 18:36:16 (E) PythonScript: exception: Traceback (innermost
> last):
> File "schema\standard\Jobs\scheduledReports\generatePPPStatistics.py",
> line 23 , in ?
> ImportError: No module named klg
Hi Vishwa,
I am confused right now. Are we talking about a Python module, or a Java
module? JCChart, as far as I can tell, is a Java package,
http://java.quest.com/support/jclass/dv/docs/api/com/klg/jclass/chart/JCChart.html
so CPython won't work with it. Instead, you can use Jython to access it.
http://www.jython.org/
If you use Jython, then adding the JAR to your Java CLASSPATH should do
the trick.
If you have further questions about Jython, there's a mailing list
dedicated to Jython:
http://lists.sourceforge.net/lists/listinfo/jython-users
Good luck to you.
More information about the Tutor
mailing list