Home arrow Python arrow Python 101 (part 7): Dinner With A Hungry Giant

Python 101 (part 7): Dinner With A Hungry Giant

Python allows developers to logically group functions togetherinto modules, which can be imported and used by any Python program. In thisarticle, find out what a module is, learn how modules and module namespaceswork, and check out the default modules that ship with Python

  1. Python 101 (part 7): Dinner With A Hungry Giant
  2. Mercury Rising
  3. Between A Rock And...Another Rock
  4. Love Bytes
  5. Enter The Hungry Giant
  6. From Python, With Love
  7. Doing The Math
  8. String Theory (And Other Interesting Stuff)
  9. Bucking The System
By: Vikram Vaswani, (c) Melonfire
Rating: starstarstarstarstar / 5
August 07, 2001

print this article


Last 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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Python Big Data Company Gets DARPA Funding
- Python 32 Now Available
- Final Alpha for Python 3.2 is Released
- Python 3.1: String Formatting
- Python 3.1: Strings and Quotes
- Python 3.1: Programming Basics and Strings
- 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

Developer Shed Affiliates


Dev Shed Tutorial Topics: