Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

text analysis in python

 
 
Steve Holden
Guest
Posts: n/a
 
      04-04-2005
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
>>> "text.py"

>>
>>
>>
>> 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
target.

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

>>
>>
>>
>> If text.py 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 "text.py" 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).

regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

 
Reply With Quote
 
 
 
Reply

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 mambenanje@gmail.com 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



Advertisments