|
From: <lc...@cs...> - 2007-06-12 04:56:37
|
Hello, Yes, I tried both (p and j, with j works). So my question was, if is =20 it possible to call a jython application using python command, or to =20 create a jython program as python module?. Sorry if this question is =20 too naive for this group, I am a beginner in jython and python. Thanks, Lorena Carlo Quoting Jeff Emanuel <jem...@fr...>: > Change p to j > > c:\jython2.2b2>jython listing7.py > > lc...@cs... wrote: >> Hello, >> >> I need to call a java application from a python program. I see =20 >> that I can create a jython program which have a similar sintax of a =20 >> python program, even it has the same file extension. I can =20 >> either compile it using jythonc into a .class file or run it with =20 >> the jython executable file (jython file.py). I need to know if =20 >> there is a way to do the opposite, this means to just execute the =20 >> Jython program using the python command (from the console, like: =20 >> python file.py). I tried it but it didn't work I get the =20 >> following error: >> >> C:\jython2.2b2>python listing7.py >> Traceback (most recent call last): >> File "listing7.py", line 1, in ? >> from java.util import Random >> ImportError: No module named java.util >> >> I am trying to run a small example that imports the Random class, =20 >> but it doesn't recognize it. When I use the jython command there =20 >> is no problem it executes it well. Please let me know what I am =20 >> doing wrong and also if there is a way to execute the jython =20 >> programs using python. >> >> Thanks, >> >> Lorena Carlo >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users |