Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > text analysis in python

Thread Tools

text analysis in python

Steve Holden
Posts: n/a
Maurice LING wrote:
> Terry Reedy wrote:
>> "Maurice LING" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Say I code my stuffs in Jython (importing java libraries) in a file
>>> ""

>> Just to be clear, Jython is not a separate langague that you code
>> *in*, but a separate implementation that you may slightly differently
>> code *for*.

> Yes, I do get this point rightly. Jython is just an implementation of
> Python virtual machine using Java. I do note that there are some
> differences, such as, Jython can only handle pure python modules.
> However, I'm not a language expert to differentiate language differences
> between these 2 implementations of Python, as in Jython and CPython. If
> someone care to enlighten, it will be my pleasure to consult. TIA.

That's not strictly correct. The Python virtual machine isn;t
implemented at all in Jython, instead the JVM is used as the compilation

>>> ... Will there be any issues when I try to import into CPython?

>> If is written in an appropriate version of Python, it itself
>> will cause no problem. Hoqwever, when it imports javacode files, as
>> opposed to CPython bytecode files, CPython will choke.

> In my example, the file "" is coded in Jython, importing Java
> libraries. I do get that I cannot import Java jar files directly into
> CPython. What I do not get is that what is so special about Jython that
> it can "fool" CPython into using Java libraries... or is that there will
> always be a need for Java virtual machine and Python virtual machine
> when I use Java libraries in Jython... and importing Jython coded files
> into CPython....

Jython is pretty much a Python interpreter that compiles Python into JVM
bytecodes. Consequently the amount of "trickery" involved is rather
less, though clearly there is some (automated conversion b etween Java
and Pythin data types where appropriate, and automated signature-based
selection of the appropriate Java method being the two most obvious).

Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC
Python Web Programming

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Evaluating static analysis and Dynamic analysis tools for C/C++ ssubbarayan C Programming 5 11-03-2009 12:50 AM
Text image analysis with the haar wavelet tommygun101 Java 0 06-08-2007 05:16 PM
data extraction, and analysis of text files Java 6 07-07-2006 03:54 AM
Re: ELF object file analysis tool in Python? John Benson Python 1 03-07-2004 12:32 AM
ELF object file analysis tool in Python? John Benson Python 2 03-03-2004 07:56 AM