Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Where is the latest step by step guide to use Jython to compile Python into Java?

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


davidgshi at yahoo

Jun 4, 2012, 7:36 AM

Post #1 of 3 (130 views)
Permalink
Where is the latest step by step guide to use Jython to compile Python into Java?

Hello,

Where is the latest step by step guide to use Jython to compile Python into Java?

I found that it was very confusing by reading not updated text.

Please help.

Regards.

David


stefan_ml at behnel

Jun 4, 2012, 8:00 AM

Post #2 of 3 (132 views)
Permalink
Re: Where is the latest step by step guide to use Jython to compile Python into Java? [In reply to]

David Shi, 04.06.2012 16:36:
> Where is the latest step by step guide to use Jython to compile Python into Java?

I don't think there is such a thing, simply because Jython does not compile
Python into Java.


> I found that it was very confusing by reading not updated text.

It usually helps to provide a pointer to that "not updated text", so that
readers know what you are talking about and can more easily provide an
alternative.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list


stefan_ml at behnel

Jun 4, 2012, 8:27 AM

Post #3 of 3 (125 views)
Permalink
Re: Where is the latest step by step guide to use Jython to compile Python into Java? [In reply to]

Narayanaswamy, Mohan, 04.06.2012 16:56:
> Python is dynanmic programming (but strongly typed), java is
> static-typed language. Currently it is not possible to convert python
> into java, since python types are dynamically identified, not identified
> during compilation.

That's not entirely true. It's *possible* to translate Python to Java, just
like it's possible to translate Python to C or other statically typed
languages. That wouldn't be a 1:1 mapping from Python language constructs
into similar looking Java language constructs, simply because the Python
constructs tend to be more powerful and general, so there is no simple
direct mapping. But assuming sufficiently complex Java code, any Python
code can be translated to equivalent Java code.

Simple prove: Jython can execute Python code, and Jython is (at its basis)
written in Java. If you now collect all Java code that Jython executes
during the run of a Python program, you get pure Java code that is
equivalent to the Python program. Maybe not beautiful code, but definitely
Java code.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.