Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Essential Libraries</strong></p> <p>The main challenge for an experienced programmer coming from another language to Python is figuring out how one language maps to another. Here are a few essential libraries and how they relate to Java equivalents.</p> <pre><code>os, os.path </code></pre> <p>Has functionality like in java.io.File, java.lang.Process, and others. But cleaner and more sophisticated, with a Unix flavor. Use os.path instead of os for higher-level functionality.</p> <pre><code>sys </code></pre> <p>Manipulate the sys.path (which is like the classpath), register exit handlers (like in java Runtime object), and access the standard I/O streams, as in java.lang.System. </p> <pre><code>unittest </code></pre> <p>Very similar (and based on) jUnit, with test fixtures and runnable harnesses.</p> <pre><code>logging </code></pre> <p>Functionality almost identical to log4j with loglevels and loggers. ( logging is also in the standard java.util.Logging library)</p> <pre><code>datetime </code></pre> <p>Allows parsing and formatting dates and times, like in java.text.DateFormat, java.util.Date and related.</p> <pre><code>ConfigParser </code></pre> <p>Allows persistant configuration as in a java Properties file (but also allows nesting). Use this when you don't want the complexity of XML or a database backend.</p> <pre><code>socket, urllib </code></pre> <p>Similar functionality to what is in java.net, for working with either sockets, or retrieving content via URLs/URIs.</p> <p>Also, keep in mind that a lot of basic functionality, such as reading files, and working with collections, is in the core python language, whereas in Java it lives in packages. </p>
 

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