Questions tagged [jython-2.7]

Jython, successor of JPython, is an open source implementation of the Python programming language written in Java.

Jython 2.7 is the latest stable Jython release.

Jython 2.7.0 was released in May 2015 as the first stable Jython version with language and runtime compatibility with CPython 2.7.0. New features include support for pip, a native launcher for Windows and many more.

201 questions
7
votes
2 answers

How can I import Pandas with Jython

I'm new to python, and I've install Jython2.7.0 Java import org.python.util.PythonInterpreter; import org.python.core.*; public class Main { public static void main(String[] args) { PythonInterpreter interp = new PythonInterpreter();…
Jimmy Chu
  • 83
  • 1
  • 1
  • 7
7
votes
1 answer

Converting to Jython a Python 3.5 project - UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 4-10: illegal Unicode character

My final purpose is to convert a running Python project to Jython interpreter because some java API's are going to be added. Details: The latest Jython is 2.7 The project I have is runnable with Python 3.5 So I took the following approach: First…
Prophet Daniel
  • 327
  • 2
  • 15
6
votes
1 answer

Is LIBGDX Slower in python than Java

I've been developing games in Python & Pygame for a while now, Though one thing that's been in mind is my dislike to pygame's performance and lack of tools and libraries. I've always known LibGDX for it's popularity and how much I've seen it on this…
Kyle Meade
  • 91
  • 5
6
votes
2 answers

What's the difference between jython-standalone-2.7.0.jar and jython-2.7.0.jar

I wrote a Java example, the code is: import org.python.core.PyObject; import org.python.util.PythonInterpreter; import javax.script.ScriptEngine; import javax.script.ScriptEngineFactory; import javax.script.ScriptEngineManager; import…
soulmachine
  • 3,917
  • 4
  • 46
  • 56
5
votes
0 answers

deploy django on tomcat

I am using Django 1.8 on Jython in Windows 10. Have created a simple Django project following the tutorial https://docs.djangoproject.com/en/1.8/intro/tutorial01. After packaging using buildwar(including jars), when I deploy the mysite.war archive…
arnap
  • 51
  • 3
5
votes
0 answers

Jython 2.7 with Java 1.8 - Import custom jar

I'm using jython 2.7 with java, with the objective of creating a python wrapper around my jar file (let's call it myJar.jar) Here's my python file: import sys sys.path.append('/pathTo/myJar.jar') from java.lang import Math #this works from java.io…
Saransh Kejriwal
  • 2,467
  • 5
  • 15
  • 39
5
votes
2 answers

IndexError: index out of range: 7

I am working with an Oracle EPM Product called Financial Data Quality Management Enterprise Edition (FDMEE). I have written a Jython script to parse a data file and push it to a custom table within the FDMEE product schema. It works fine when I am…
Gautam TP
  • 51
  • 2
5
votes
0 answers

Change Jython standalone jar in Pig

I am trying to find a way to replace the version of jython-standalone-2.5.3.jar that is used by Pig on Hadoop. Pig 12 currently uses jython-standalone-2.5.3.jar and I am trying to use jython 2.7 beta4. What is a good way to replace the jython…
macha
  • 7,337
  • 19
  • 62
  • 84
4
votes
0 answers

Jython code throws ImportError when invoked from a Java jar

I am trying to invoke a Python script from a Spring Boot application which is bundled as a JAR. I added Maven dependency for Jython Standalone 2.7.1. The following code throws error at the execfile call (the code is able to get the Python file as…
Dchucks
  • 1,189
  • 5
  • 22
  • 48
4
votes
1 answer

Odd behaviour when comparing Java and Jython types

Why do I experience the following behaviour when comparing a Java integer to a Python one of the same value in Jython? >>> from java.lang import Integer >>> 10 == Integer(10) False >>> 10 <= Integer(10) True >>> 10 >= Integer(10) True Okay, so I…
4
votes
2 answers

import urllib.parse returns "ImportError:No module named parse" for jython 2.7.0

I am using jython 2.7.0 with Java 1.7.0_45 on Windows 7. I call my module with the following Java code try{ python.exec("import sys"); python.exec("sys.path.append('c:/Python')"); python.exec("import myModule"); …
OtagoHarbour
  • 3,969
  • 6
  • 43
  • 81
3
votes
3 answers

Maximo automation script no module named socket

I'm developing an automation script and I'm getting the next error: ImportError: No module named socket in at line number 2 I'm using jython 2.7, maximo 7.6. Someone knows a workaround? I know that not every package is installed as it were in…
szrk_dn
  • 33
  • 3
3
votes
1 answer

Run a python function with arguments from java using jython

I want to execute a Python function which is located in one of my python projects from java by using jython. https://smartbear.com/blog/test-and-monitor/embedding-jython-in-java-applications/ is giving the sample code for the purpose. But in my…
3
votes
0 answers

Calling Python from Jython

I want to be able to graph using Matplotlib in Jython so that I can use ABAGAIL inside of Python. ABAGAIL: https://github.com/pushkar/ABAGAIL Jython does not seem to support Matplotlib. But I found the following idea on how to call Python inside of…
Bruce Nielson
  • 753
  • 8
  • 23
3
votes
1 answer

launching Jython console with Tomcat 8 servlet

If I launch Jython like this: "java -cp jython.jar" or "java -cp jython.jar org.python.util.jython" works ok and launches Jython REPL if I include another jar like: "java -cp jython.jar:servlet-api.jar org.python.util.jython" gaves me the…
ZEE
  • 2,931
  • 5
  • 35
  • 47
1
2 3
13 14