This article discusses Jython, a software project that aims to provide seamless integration between Java and Python. This article requires a basic understanding of both languages.
This article discusses Jython, a software project that aims to provide seamless integration between Java and Python. This article requires a basic understanding of both languages.
Thanks for the article! I think I’m going to be learning python now and mixing it my Java code.
i would like to see an open source python for .NET (mono). I wonder for what you need jython at all. python is as portable as java.
It’s used in much the same way guile is used. To extend/script much more massive projects that are impractical to implement in python/scheme.
Python does not work very well in that kind of system. Mark Hammond did a project at one point to do that very thing and not with good results if I remember correctly. And sometimes I don’t.
I think python.net already exists. Anyway, jython is way outdated in regard to CPython. too bad so little people working on it. Anyway, take a look even at JRuby and groovy
Groovy: http://groovy.codehaus.org/
E Language: http://www.erights.org/elang/
Netrexx: http://www2.hursley.ibm.com/netrexx/
Nice: http://nice.sourceforge.net/
may be off topic, sorry
but is java the only programming langugae that is platform independent ?
i mean in terms of you can make proper aplpicatsions out of it and not justa scripting language.
Snake
The world-standard in portable programming is assembly language. Because It actually assembles codes from distinct modules with defined behaviors, one module can be converted into any other behavior using an advanced mathematical technique known as set theory. This way you can write assembly language and convert a program into another program using a set of mathematical equiations, thus facilitating portability between distinct sets of scripting languages.
Average Joe:
I don’t doubt you but on what do you base assembler as portable? I have only done assembler for a couple of speed critical components and even that was close to a decade ago so I am a little ignorant here. But portability is not something I have ever associated assembler with. Not to mention it is difficult to manage and harder for third party developers to follow than any high level language.
NASM has a certain level of inherent portability I suppose but that is the only example I can think of. I would think it would be easier to port C, especially if you knew you were going to be cross platform when you started. Just stick to ANSI C as much as you can and leave clean hooks for anything else.
Add to the list:
JRuby: http://jruby.sourceforge.net
ObjectScript: http://objectscript.sourceforge.net/
Smoerk:
Python .NET is available from http://zope.org/Members/Brian/PythonNet/
Not sure about its status, but apparently it works well, even with Mono for Windows and Linux.
Snake:
Java is not the only language that is platform dependent. Python is (my own Python app worked on Windows, Linux, BSD and OS X without changing a single line of code), Perl is, Tcl/Tk is, and I am sure others like Ruby and Scheme are too. The scripting (scripted?) languages tend to be the most portable languages. Indeed, some would argue that Python is more portable than Java is! (but again, this depends on the programmer and the program more than anything: some folks write good x-platform code, others dive straight in and use platform specific features to show how “kewl” they are)
btw – it’s not just a “scripting language”. It may have started off as one, but now it is a general purpose language and applications can (and have been) written using it.
Average Joe:
Umm – assembly is processor dependent to a very high degree. Code written for a 686 is very unlikely to work on (say) a G4 based system. It’s the least portable code around because a lot of it depends on what processor you are using, though of course, a skillful programmer may be able to work around it. Troll?
Everyone:
There is also a compiler to convert Ada code into Java. For anyone who cares… ;^) (actually like Ada myself!)
where python really shines is interactivity. you can type your python commands into the interpreter and see the results right away.
the one thing i like to use python for is quick interactive exploration of complex program logic. and jython lets me do it with web applications. i created a web app containing the jython interpreter that runs python code submitted using a web form and displays the output of the script right there on the page. great way to fiddle around with j2ee apps
Adding to the list: Aardappel (Hi wouter!)
http://wouter.fov120.com/aardappel/index.html
I’ve been toying with the idea of designing and implementing a language runnint on top of Java myself for some time now. 🙂
jython + JDBC (see <A REF=http://www.jython.org/docs/zxjdbc.html>Database connectivity in Jython is a powerful tool for working with Relational database systems.
The combination makes connecting to a MS SQLServer database from *nix systems a breeze. The the code transparently works from OS to OS. I have had great success using the same code on HPUX, AIX, Solaris, Linux and even Windows.
A diamond in the rough of programming languages which deserves more attention.
I think *many* languages let you do that (i.e. type and see the code evaluated.
Ruby let’s you do that (type ‘irb’)
Ocaml let’s you do that
Erlang let’s you do that
and so on. Actually Even java, just look at eval()..