On 5/25/12 9:08 AM, Brent Millare wrote:
Ok well installing is easy

java -jar jython_installer-2.5.2.jar

# to get python repl
java -jar jython

# to run script
java -jar jython ./python.py

I haven't looked into calling python functions (running in jython) from clojure though because unfortunately, I wasn't able to get jython to work with sympy, which is what I wanted clojure to interact with to do symbolic math do to a bug in jython, so this is already a dead end for me.

I guess its down to calling python as a script from within clojure, not ideal, but I guess it'll work for now.

Since you can't bring the python to the JVM you could try bringing the clojure to python with clojure-py[1] :). Clojure-py is pretty new though so depending on the nature of your project it may not be a great fit. Another option for inter-process communication would be to use zeromq since both python and clojure bindings exist. This would at least be a better solution than shelling out to python everything time you needed to use the library.

-Ben


1. https://github.com/halgari/clojure-py

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to