Python
  Home arrow Python arrow Python 101 (part 7): Dinner With A Hungry Giant
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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 7): Dinner With A Hungry Giant
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2001-08-07


    Table of Contents:
  • Python 101 (part 7): Dinner With A Hungry Giant
  • Mercury Rising
  • Between A Rock And...Another Rock
  • Love Bytes
  • Enter The Hungry Giant
  • From Python, With Love
  • Doing The Math
  • String Theory (And Other Interesting Stuff)
  • Bucking The System

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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 7): Dinner With A Hungry Giant
    ( Page 1 of 9 )

    Python allows developers to logically group functions together into modules, which can be imported and used by any Python program. In this article, find out what a module is, learn how modules and module namespaces work, and check out the default modules that ship with PythonLast time out, I introduced the fundamental unit of software abstraction - the function - and demonstrated it in the context of a Python program. I illustrated how functions can be used to package code into reusable modules which, when combined with arguments and return values, add a whole new level of flexibility to your code. Finally, I talked at some length about variable scope inside and outside functions, and discussed some of the tools Python offers to assist in optimal usage of functions.

    However, packaging your code into functions is just the beginning. Python also allows you to create collections of shared code fragments, or "modules", which may be imported and used by any Python program. Powerful, flexible and very interesting, modules can be one of the most potent weapons in a Python developer's arsenal...so long as they're used correctly.

    Over the course of this article, I'll be exploring Python modules in detail, together with examples of how to create, import and use modules in your own development activities. As if that wasn't enough, I will also be looking at some of the built-in modules that ship with Python, and demonstrating how they can speed up code development. So let's get going, shall we?

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

       

    PYTHON ARTICLES

    - Tuples and Other Python Object Types
    - The Dictionary Python Object Type
    - String and List Python Object Types
    - Introducing Python Object Types
    - Mobile Programming using PyS60: Advanced UI ...
    - Nested Functions in Python
    - Python Parameters, Functions and Arguments
    - Python Statements and Functions
    - Statements and Iterators in Python
    - Sequences and Sets in Python
    - Python Expressions and Operators
    - Dictionaries, Variables and Statements in Py...
    - Data Types in Python
    - The Python Language
    - SSH with Twisted





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT