Questions tagged [jython]

Jython is an open-source implementation of the Python programming language in Java. Use this tag for questions specific to this implementation, general Python questions should just be tagged with "python".

Jython is an open-source implementation of the Python programming language written in Java. It is seamlessly integrated with Java, in that it can import and use any Java class. Jython is extensively used as a official scripting language for all WebLogic Server administration tasks.

Jython is also used for administrative scripting for IBM's WebSphere Application Server through the Wsadmin client.

Helpful References

2784 questions
5
votes
5 answers

Best dynamic language to pair with Java on a Java project

What is the best dynamic language to pair with Java on a large Java project? We are considering using a dynamic language for tests, controllers, services. Some options are Groovy, JRuby or Jython. What are the pros and cons of each for this? …
Alex Baranosky
  • 48,865
  • 44
  • 102
  • 150
5
votes
3 answers

Uses of Jython while programming

I recently started learning Python and came accross the term Jython. From the Google search results, I thereby concluded that it is indeed a very important term. What is the experience programming/coding using Jython?
this.Liar
5
votes
1 answer

Reading an sqlite database from Jython

I am trying to run the jython sqlite examples posted here. ################################################################################ # # sqlite_using_ziclix - An example of using the Python DB-API 2.0 compliant # …
D R
  • 21,936
  • 38
  • 112
  • 149
5
votes
2 answers

Why not Rhino for JVM apps?

I would like to develop some apps for the JVM using a concise, dynamic language. The most popular choices for this seem to be Jython, JRuby, Groovy, and maybe Clojure. Rhino appears to be fast and very stable, but I see no books on Rhino development…
user287424
  • 1,219
  • 12
  • 22
5
votes
2 answers

How do I determine if an email is Base64 encoded?

I am having difficulty determining if the body of a text email message is base64 encoded. if it is then use this line of code; making use of jython 2.2.1 dirty=base64.decodebytes(dirty) else continue as normal. This is the code I have atm. What…
Setori
  • 10,326
  • 11
  • 40
  • 46
5
votes
2 answers

Python String to Java byte[]

From what I have understood, A Python 2 string (type str) is nothing but a sequence of bytes. How do I convert such a string to a Java byte array, explicit? A naive attempt that doesn't work: from jarray import array myStr = 'some str…
holmis83
  • 15,922
  • 5
  • 82
  • 83
5
votes
2 answers

Overload instance[key] += val

I am writing a Java collection class that is meant to be used with Jython. I want end users to be able to manipulate the collection this way: myCollection = MyJavaCollection() myCollection[0] += 10.; a = myCollection[0]; //a = 10 myCollection[0] +=…
David
  • 1,138
  • 5
  • 15
5
votes
1 answer

Jython saying "No visible constructors for class"

I have a jython servlet as part of a large application running in tomcat5. I tested a few Spring Framework classes and create the objects in the Jython servlet. When I try to create objects of classes in the application I catch an Exception message…
Clutch
  • 7,404
  • 11
  • 45
  • 56
5
votes
3 answers

jython.exe "2.7.0 final release" failed execution on my Windows OS

OS: Windows 7, 64-bit Here I learn that the latest version of Jython (downloads/installs as "2.7.0") includes the "ensurepip" module, which hopefully installs pip. This is what I get... NB there is no drive "Z:" on my…
mike rodent
  • 14,126
  • 11
  • 103
  • 157
5
votes
1 answer

How to execute Python script from Java code in Android

I'm trying to make an standard Android application execute a python script that could return values to Java, but I'm facing a lot of issues. Jython doesnt support this in the Android environment, SL4A is a dead project, Kivi seems to be an full…
Israel Fonseca
  • 1,082
  • 10
  • 22
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
5
votes
0 answers

Is there any way to get Jython support in VIM / gVIM?

Does anybody know how to get Jython support in VIM / gVIM? (preferably on windows or alternatively on mac) By Jython support I mean code completion, syntax highlighting etc. especially when working with third party .jar files (e.g. sikulixapi.jar…
Wlad
  • 2,866
  • 3
  • 28
  • 42
5
votes
2 answers

Why sometimes Python subprocess failed to get the correct exit code after running a process?

I am using Python subprocess to run external scripts on Windows 7. I am trying to get the exit code. In case 1, I run a python script test1.py. test1.py import sys sys.exit(24) <--exit code myscript1.py import subprocess process =…
userpal
  • 1,483
  • 2
  • 22
  • 38
5
votes
3 answers

Using Jython with Django?

I am planning to use Jython with Django. I want to know how stable the Jython project is, how easy to use it is, and how large its developer community is.
Nitin Garg
  • 2,069
  • 6
  • 25
  • 50
5
votes
1 answer

Jython variable to Java Beanshell in ODI

I have the variable total_lines on a jython command that I needs to be accessed on the refreshing command of a ODI variable. with open('file.txt') as file_name: for total_lines, line in enumerate(file_name): pass print…
Afonso
  • 417
  • 1
  • 5
  • 16