4 ms·
What is the typical use case for Jython? Is it so that people can run Python at companies that only run Java? In that use case, I'm assuming people are creating
by KenCochrane 15y ago
What is the typical use case for Jython? Is it so that people can run Python at companies that only run Java? In that use case, I'm assuming people are creating a python app, and then compiling a War, and then deploying on Tomcat or Jetty?
- mynegation 15y agoThis and if you have a large (sometimes legacy) JVM-based (i.e. not just Java, but Scala or Clojure as well) code base that you want to integrate with Python: Hadoop and Weka come to mind.
- KenCochrane 15y agoI see. Can you access/call the java/scala/closure classes from inside of your python code? If so, that is pretty cool.
- benmccann 15y agoYes. http://wiki.python.org/jython/WhyJython http://wiki.python.org/jython/WhyJython
- waterside81 15y agoYup, banks don't like Python, but Java is OK. So you write your Java in Jython, package it up & deploy. Here's another use case. At Repustate, we have an API to create PowerPoint presentations via an API call. We use Apache POI (Java) to create & manage PowerPoint slides, but our code base is all Python. So we have a Jython process running on Jetty, but instrument all of the Java bits with Python. It's pretty amazing to have all of the power of the JVM at your disposal but with the grace of Python.
- KenCochrane 15y agoyeah that is pretty cool.
- pasbesoin 15y agoIt's been a while, but I recall a Java shop where the (complicated) build process was written in Jython.
- wslh 15y agoI can think about the power of Python scripting + the rich world of Java libraries/frameworks. My main use is for web scraping + javascript support, since I love Python and I like the HTMLUnit headless browser written in Java. I've written two articles using it: i) http://blog.databigbang.com/web-scraping-ajax-and-javascript-sites/ http://blog.databigbang.com/web-scraping-ajax-and-javascript... ii) http://blog.databigbang.com/automated-browserless-oauth-authentication-for-twitter/ http://blog.databigbang.com/automated-browserless-oauth-auth...