Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jythonc missing

Tags:

python

jython

I just installed Jython 2.5.1. I want to convert my Python file into Java class file and it is instructed on the website to use the jythonc command-line tool but I can't find it. Does anyone know where I could find it?

Basically what i was trying to accomplish is to get my Python code running client-side in a browser and the best way seemed to be by creating an applet using Jython. I don't want to create a desktop application and using Silverlight/IronPython is out of the question. Any other ideas are welcomed.

Cheers!

like image 893
Mridang Agarwalla Avatar asked May 04 '10 06:05

Mridang Agarwalla


2 Answers

You can still compile your python-code to class-files:

import compileall; 
compileall.compile_dir('Lib'); # to compile yor Lib-Dir 

should work with 2.5 jython

i use it to create class-files to put in jars :-)

like image 165
Blauohr Avatar answered Oct 05 '22 02:10

Blauohr


Jythonc was removed in Jython 2.2 and is no longer supported. The official way to embed Jython code in Java is to create an instance of the interpreter to run the Jython code directly. There is an article on this here.

Personally I preferred the jythonc method and hope it will be reinstated in a future version of Jython, even though it had a number of issues.

like image 33
Dave Kirby Avatar answered Oct 05 '22 01:10

Dave Kirby