Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Isn't this a translation and not a port? :)</p> <p>I just <a href="http://www.google.com/search?hl=en&amp;client=firefox-a&amp;rls=org.mozilla%3Aen-US%3Aofficial&amp;hs=G1w&amp;q=automatic+port+java+to+python&amp;aq=f&amp;oq=&amp;aqi=" rel="nofollow noreferrer">googled</a> and found <a href="http://code.google.com/p/java2python/" rel="nofollow noreferrer">java2python</a> as well as <a href="https://stackoverflow.com/questions/448095/porting-library-from-java-to-python">a similar SO question</a>.</p> <p>Anyway ...</p> <p>Ideally, i think you should understand what you're translating so you can know what to translate and what you shouldn't need to translate. You need a reasonable understanding of both languages to know how constructs in Java relate to the similar in Python and how libraries play roles in the translations.</p> <p>A direct translation between languages is often not a good approach. I mention this simply because the translated Python in your question isn't very Pythonic. And also because a fair amount of the Python is concerned with the HTTP Server aspects. That isn't the case with the Java code. So to produce a "fair" translation, i would have relied on a Python framework that does for Python what Servlet containers do for Java. Maybe <a href="http://www.tornadoweb.org/" rel="nofollow noreferrer">Tornado</a>/<a href="http://www.djangoproject.com/" rel="nofollow noreferrer">Django</a>. My point being, a Java Servlet is wrapped up in a significant set of standards so it makes sense that the Python version follow a similar route, which, at a minimum, probably means <a href="http://www.python.org/dev/peps/pep-0333/" rel="nofollow noreferrer">WSGI</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload