Python
  Home arrow Python arrow Page 2 - Python 101 (part 1): Snake Eyes
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PYTHON

Python 101 (part 1): Snake Eyes
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2001-05-29

    Table of Contents:
  • Python 101 (part 1): Snake Eyes
  • The Jedi Master Speaks
  • Start It Up
  • Dissecting A Python...Program
  • Milk And Toast And Honey
  • Adding Things Up

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Python 101 (part 1): Snake Eyes - The Jedi Master Speaks


    (Page 2 of 6 )

    Some of Python's most powerful features include:

    Object-oriented framework: Built from the ground up as an object-oriented language, Python provides built-in constructs that make it simple for developers to structure code for maximum reusability. Python's "dynamic typing", which automatically recognizes objects like numbers, strings and lists, and negates the need to declare variable types and sizes, offers an advantage not found in languages like C or Java, while automatic memory allocation and management, together with a vast array of pluggable libraries and high-level abstractions, complete the picture.

    Extensibility: Python makes it easy to add new capabilities to your code, by importing specialized libraries into your program. A large number of pre-built libraries ship with the standard Python distribution, and more are available free of charge on the Web. Additionally, Python also allows you to compile new "extension modules" for additional functionality, or to improve performance.

    Portability: Python distributions are available for a wide variety of operating systems, including Windows, Macintosh, Amiga and most flavours of UNIX, including Linux. This portability ensures that code written on one platform will work on others with zero or minimal changes required. In case a distribution isn't available for a specific platform, you can even download the source code and compile it yourself!

    Readability: Python's clear and elegant syntax, and emphasis on proper indentation of code blocks, improves code readability, making it easier to understand code a year later. By imposing lexical and syntactical rules on language constructs, Python reduces the time spent on understanding (and developing) application logic, and also makes program code easier to maintain over time.

    Performance: There's an interesting piece of trivia geeks should be aware of here. Python is an odd hybrid of compiled and interpreted languages: the code you write is first converted to so-called "bytecode" and then executed by the Python interpreter. Since executing bytecode is faster than interpreting statements line-by-line, Python offers a substantial performance advantage of other interpreted languages. It should be noted, however, that the conversion to bytecode is handled internally by Python, and is not visible to the end user.

    Open licensing model: Like Perl and PHP, Python is available for free, to anyone who wants it, over the Internet, in both source and binary form. Users may use and distribute it without restriction, and even charge a fee for it if they so desire.

    Programmers love to debate the virtues of different programming languages, and it's no different here. However, Python comes off favourably in most of these comparisons. You can find detailed evaluations of Python versus other programming languages at http://www.python.org/doc/Comparisons.html. And you might want to take a minute to enjoy this nugget culled from the Python humour pages at http://www.python.org/doc/Humor.html

    EXTERIOR: DAGOBAH -- DAY

    With Yoda strapped to his back, Luke climbs up one of the many thick vines that grow in the swamp until he reaches the Dagobah statistics lab. Panting heavily, he continues his exercises -- grepping, installing new packages, logging in as root, and writing replacements for two-year-old shell scripts in Python.

    YODA: Code! Yes. A programmer's strength flows from code maintainability. But beware of Perl. Terse syntax...more than one way to do it...default variables. The dark side of code maintainability are they. Easily they flow, quick to join you when code you write. If once you start down the dark path, forever will it dominate your destiny, consume you it will.

    LUKE: Is Perl better than Python?

    YODA: No... no... no. Quicker, easier, more seductive.

    LUKE: But how will I know why Python is better than Perl?

    YODA: You will know. When your code you try to read six months from now.

    More Python Articles
    More By Vikram Vaswani, (c) Melonfire


     

       

    PYTHON ARTICLES

    - SSH with Twisted
    - Mobile Programming in Python using PyS60: UI...
    - Python: Count on It
    - Python Strings: Spinning Yarns
    - Python: More Fun with Strings
    - Python: Stringing You Along
    - Python Operators
    - Bluetooth Programming in Python: Network Pro...
    - Python Sets
    - Python Conditionals, Lists, Dictionaries, an...
    - Python: Input and Variables
    - Introduction to Python Programming
    - Mobile Programming in Python using PyS60: Ge...
    - Bluetooth Programming using Python
    - Finishing the PyMailGUI Client: User Help To...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway