This is an overview of the major modules from the Python Standard Library and other major Python repositories.
Training a spam filter can take a good deal of time and effort. Use
an email whitelist to jumpstart the spam filter process. Here's how
to create a whitelist of good email addresses for your spam filter.
Accepting login information in plain text is inherently dangerous from the persepctive of computer security. Fortunately, Python has the getpass module which allows the handling of login information without leaving a trace in a system's cache.
Whether you are coding for the Web, the desktop, or for handheld communication devices (PDAs, smartphones, etc.), being able to collect email is an important part of network programming. Here is how to use the poplib module to access a remote POP3 mailbox.
Python's os module handles much of the language's portability with respect to the local operating system. Here is how to do cross-platform system programming with Python.
Python's os module provides a convenient interface for many system-level operations. This overview of the module shows how to interact dynamically with the operating system and runtime environment of the Python interpreter.
In the Wild World of the Web, checking the DNS entry of a URL or IP address is increasingly necessary. Here is how to do it with the Python socket module
Python's shelve module is a powerful way to include persistence and to save objects in an easy-access database format. Here is how to open, assign value to, restore value from, and close shelve dictionaries and databases.
For reasons of security and the smooth-running of your program, it is a good idea to check whether an executable exists before you call it. There are two ways to do this in Python.
Calling non-Python programs from within an application is not as easy as simply importing them like a Python module. But it is also not that complicated. Here is how to issue calls within the operating system using Python's os module.
When making a localised system call, one that does not use an absolute path name, it is important for security's sake to ensure that the program and/or its arguments actually exist in the local path. Here is how to use Python's os module to check your immediate environment.
Python's pickle module is a quick and easy way to save Python objects in a standard format. Here is how to save and restore Python objects with pickle.
Python supports several operations that modify objects in situ. These are called mutable because no output is necessary. Here is a guide to what they are and how they are used.
Python's os module contains several very powerful functions for interacting with the operating system. Here is how to use os.system() to execute an external program from within Python.
Python's xrange() function is a very easy way to generate a range without consuming a lot of resources. Here is a reference to how it is used and what operations it supports.
Python's string formatting operations are important to know for most any program that you write. Here is a comprehensive guide to them.
Python supports several kinds of sequences. Here is a guide to each.
Python's iterators are very powerful and helpful. Here is a guide to the iterator protocol used in Python.
Python's bit string operations are an important part of advanced programming. Here you will find a reference to the bit-wise operators in Python.
Python's built-in set types are helpful ways to create both mutable and immutable sets of values for use in your programming. Here are the functions and methods that you can use with each.
Python recognises several types of numbers. Here is a reference for the numeric types that Python knows and what you can do with them.
Python's comparison operations are pretty straightforward. Here is a reference to them with a bit of detail that you may not know.
Boolean operators are a significant part of Python programming. Here is a reference on how to use them.
Testing values true or false is a critical part of Python programming. Here are some of the finer details of what tests as false and what tests as true in Python
Python's string module offers a bevy of functionality. Some of it, however, has been moved to the built-in string methods. Here are the functions that are deprecated.
This page offers an overview of the most commonly used modules from the Python Standard Library. It is not intended as a replacement for the documentation. Rather, it highlights modules which factor into most general purpose programming projects.
Python's built-in exceptions are many; knowing them really helps your programming.
Python's built-in warnings are important to know. Here is a list of them.
Python's
re module is without a doubt one of the most commonly used parts of the Python library. Remember its functions, on the other hand, is not always easy. Here is a reference to help you keep it all straight.
Python's
re module is without a doubt one of the most commonly used parts of the Python library. Here is a reference of the methods and attributes available in each regex object
Python's
re module is without a doubt one of the most commonly used parts of the Python library. Here is a reference of the methods and attributes available for every match of a regular expression.
Python's socket module is the foundational module for all network programming in Python. Here is a reference of the functions, classes, and constants available through it.
Python's socket module is the foundational module for all network programming in Python. Here is a reference of the functions, classes, and constants available through it.
Python's socket module is the foundational module for all network programming in Python. Here is a reference of the functions, classes, and constants available through it.
Python's built-in string methods are incredibly powerful. As the name implies, each of the following methods are available through class
String. Every string object is an instance of that class and has these methods available. This is the first of a two-part reference on Python's built-in string methods.
Python's string module provides many helpful constants that you can use in your programming. Here is each of the constants and a brief description of each.
Python's string module provides a couple of functions that are not available through string methods. Here they are with brief descriptions of each for your reference.
Python's string module provides a Template class to process strings powerfully and en masse. Here is a description of the methods and the single attribute of this class and an example of how to use template string objects.
If you just want to read the documentation on the Python library, this page is for you. The Python website has a complete discussion of every module that comes with the standard installation of Python. It may be terse or obtuse at times, and not every call is discussed in detail, but this is the "standard".
The Python library is so vast that it is near impossible to know all attributes and all methods of all modules. Fortunately, you do not need to remember all of that. This guide by Fredrik Lundh offers a comprehensive treatment of every attribute and every method of every module in the
Python Standard Library. If you would rather have the book, you can buy it from
O'Reilly Media.
If you still find yourself tempest-tossed about what object-oriented programming is and how to do it with Python, this page from Python.net offers a clearly written and well-rounded discussion on the subject. Another excellent discussion on the topic is by Matthew Reynolds at
StarDeveloper.com.