| You are here: | About>Computing & Technology>Python |
![]() | Python |
Python: Most Popular ArticlesThese articles are the most popular over the last month. "Hello, World!" The purpose of this Hello World tutorial is to take a simple program and build upon it to illustrate the various elements of the Python language. Python Tutorials for Beginners This series of tutorials is intended to help anyone learn to program in Python. If you are new to computers, however, you may benefit from the absolute beginner's tutorial: How a Computer Looks at Your Program. Python Text Editors Before you can start programming in Python, you must ensure you have the right equipment. In addition to having Python installed, you will need a text editor. Here I offer some suggestions on choosing one that you will meet your needs. String Methods - 1 of 2 Python's built-in string methods are incredibly powerful. As the name implies, each of the following methods are available through class [b]String[/b]. 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. A Simple Python Web Server Web servers are an invaluable part of the Internet. But sometimes Apache is over the top for a web service solution. Sometimes all you need is a little program to deliver data upon request. Here is how to build one with Python's socket module. Regular Expressions Primer This primer offers a concise discussion of the regular expression syntax used in Python. If you need a reference, this will be helpful. If you are unsure what to do with regular expressions, you may benefit from the [link url=http://python.about.com/od/tutorial1/]Python tutorial[/link]. A Python Web Client The first step in programming toward the Internet is to tell Python to create a socket object. Here is how to do it. Python Exceptions This tutorial is part of a series designed to help you learn to program in Python. This tutorial looks specifically at the exceptions, errors, and warnings within Python while using raise. This step looks at raising your own exceptions with raise. Beginning Python This beginning tutorial is part of a series for learning the fundamentals of Python. It covers the data types used in Python. What is Python? This series of pages discusses what Python is, why one would want to use it, and how it differs from other programming languages. Python and PostgreSQL This tutorial teaches how to read data from a PostgreSQL database using psycopg. Python 2.5's 'with' Statement One of the new features that was released with Python 2.5 last month is the 'with' statement. For those of you who are used to Python's try...except statement, you may find this to be the biggest boon of upgrading. Forming RegEx Every successful Python programmer understands Python's regular expression (regex) system and how to formulate regular expressions for matching. Understanding regex is key to Python programming. How do you match some but not all of a list? Use Python's regular expressions to your advantage. Python Decorators The built-in Python function classmethod() was a pre-cursor to Python's decorators. Python CGI This tutorial discusses how to use Python to receive and process data from the Common Gateway Interface (CGI). It assumes that you are familiar with CGI basics. If you are not, you should first work through the material at [link url=http://webdesign.about.com/od/cgi/index.htm]About.com's Webdesign site[/link]. Running a Python Program Programming is pointless if you cannot run, or execute, the program you write. Executing a Python program tells the Python interpreter to convert the Python program into something the computer can read and act upon. There are two ways to do this: using a Python shell and calling the Python interpreter with a "bang" line. The how-to's of both are addressed here. String Formatting Operations Python's string formatting operations are important to know for most any program that you write. Here is a comprehensive guide to them. Python Game Programming If you simply cannot wait for About.com's tutorial on developing games in Python, you might try one of these tutorials. They cover the development of simple geometric games through to more complicated, arcade-style games. Create A Calendar In Python Whether you want to develop a web-based diary or just want a calendar for your website, a dynamically created calendar in HTML is a very useful item to have. Creating one is a snap with Python's calendar module. Line-By-Line File Analysis This tip gives advice on analyzing a file one line at a time. This type of analysis is particularly useful when writing a program that will be run several times simultaneously (e.g., CGI scripts). The Python Library 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 Exceptions Python's built-in exceptions are many; knowing them really helps your programming. Beginning Python: Syntax This tutorial is part of a series on the fundamentals of Python. It covers the syntax used in Python programming. If you are new to Python, this tutorial is for you. If you are completely new to programming but have been using a computer for a little while, you should do fine with these tutorials. If you are completely new to computers, you may want to read through the tutorial [link url=throughacomputerseye]"How A Computer Looks at Your Program"[/link]. Using PHP-Javascript for CGI Javascript watches user actions and behavior and initiates actions accordingly. Here we submit a form without the usual 'Submit' button. Testing CGI Testing CGI scripts can be a tedious task, especially when you do not know the environmental variables under which you are programming. Here is a simple script that gives you the information you need. Python's os Module 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. HTML Forms with Python This tutorial discusses how to use Python and CGI to create HTML pages on the fly. It assumes that you are familiar with HTML, HTML forms, and CGI basics. Beginning Python: Operators This tutorial is part of a series designed to help you learn to program in Python. This tutorial looks specifically at the operators within Python. Getting a Line With Python Getting a line from a file is easy with Python. This tip shows you how. RSS Reader in Python An RSS Reader is a straightforward program, and building one ensures that one knows the basics of the language. It also teaches the basics of Python web programming and XML handling. Follow these step-by-step tutorials to build a web-based, customisable RSS Reader. An FTP Client in Python FTP is a critical protocol for a host of networking solutions. Here is how to use Python's ftplib module to store and retrieve lines of data using binary mode. How a Computer Reads Are you clueless about what a computer actually does with a program? If so, this tutorial is for you. It will tell you the basic parts of a program's composition and how the computer "sees" them. Python's String Templates 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. The socket Module - Pt1 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. An Introduction to wxPython Only so much can happen at the command line. Most every modern application has a graphic user interface (GUI). For Python, wxPython is the most mature, cross-platform graphic interface available. This introduction shows how to say "Hello, World!" with a GUI. set and frozenset 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. Programming Securely Programming for security is an imperative for the web programmer. Any sloppy coding can be exploited and amount to significant financial and personal losses. Here are some tips on programming Python securely. MySQL Insertion How to get MySQLdb. Self-Documenting Code Python has built-in documentation features. Here is how to write self-documenting functions. Python Encodings Python's encoding functions offer a means of encoding ASCII in Unicode and vice versa. Any program that might be used on the internet someday will need to work with multiple character sets. Here is how. Comparison Operations Python's comparison operations are pretty straightforward. Here is a reference to them with a bit of detail that you may not know. Accessing MySQL with Python Python comes with "batteries included", as the saying goes. This reference to the Python library also suggests the secret to Python programming in general. It is also the basis for any database management you want to do. Python modules exist for every major database format. Here we look at the more common ones. Working With Files in Python When computers are not reading code, they are processing data from or to files. These tips show you how to do some common tasks related to file input and output using Python. Bit String Operations 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 File Descriptors 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. What is a Regular Expression? Regular expressions are a Python programmer's best friend. Understanding what they are and how to use them will help you leap tall programming tasks in a single bound. Python Regex: Regex Negation Python's regular expression (regex) engine is very powerful. This page discusses regex negation. RegEx Examples: Escape Python's regular expression (regex) engine is very powerful. This page discusses the escape character or backslash. Boolean Operations Boolean operators are a significant part of Python programming. Here is a reference on how to use them. Python String Constants 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. The socket Module - Pt3 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. Deprecated String Functions 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. Pt 1: Laying the Groundwork first step in any software project is understanding the problem and then laying the groundwork. Here we consider the tasks of an RSS Reader and lay the groundwork in HTML, CGI, and PHP. Types of Peer-to-Peer Networks One of the more avant-garde forms of network programming is peer-to-peer networking. Here is an introduction to what peer-to-peer entails and what it looks like in general terms. RegEx Examples: Inequality Python's regular expression (regex) engine is very powerful. This page discusses square braces or brackets. Analyze A File All-At-Once This tip gives advice on analyzing one or more files simultaneously using Python's dictionary data types. This type of analysis is useful for local analysis (as opposed to network server usage) when parts of one or more files need to be consulted simultaneously and in rapid succession. Pythons 're' Module Python's [b]re[/b] 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. The socket Module - Pt2 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. Pt 2: The Feed Address The first step in any software project is understanding the problem and then laying the groundwork. Here we consider the tasks of an RSS Reader and lay the groundwork in HTML, CGI, and PHP. Pickle Objects With Python 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. RegEx Examples: *? Python's regular expression (regex) engine is very powerful. This page discusses the compound regex: '*?.' Bang Line 'Bang Line' defined. Pt 3: Finishing the Program The first step in any software project is understanding the problem and then laying the groundwork. Here we build a Python program that fetches RSS feeds and presents them in HTML via CGI or via PHP and Javascript Pt 2: The Feed Address The first step in any software project is understanding the problem and then laying the groundwork. Here we consider the tasks of an RSS Reader and lay the groundwork in HTML, CGI, and PHP. Checking URLs With Python 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 Regex: the Colon Python's regular expression (regex) engine is very powerful. This page discusses the use of the colon. RegEx Examples: the Carat Python's regular expression (regex) engine is very powerful. This page discusses the carat symbol. Secure Python Programming All but the simplest programs operate in a web-enabled environment. Navigating the (in)security of such an environment is notoriously difficult. This article looks briefly at the state of network security and what it means for Python programmers. Python's Protocol Modules While most programming is done with local resources in mind (i.e., your computer), Python is more than able to pull data from the furthest reaches of the globe for whatever purpose you deem necessary. It does this via network protocols. A [link url= /od/programmingglossary/g/defprotocol.htm]protocol[/link] is simply a set format for exchanging information. These pages address how your Python program can communicate over a network using protocols such as SOAP and TCP/IP as well as platforms such as Zope and Plone. RSSReader.py Python Code for an RSS Reader Numeric Types and Operations Python recognises several types of numbers. Here is a reference for the numeric types that Python knows and what you can do with them. The Shell vs The File In Python, there are two ways to create a program: the Python shell and the text file. This article offers a brief overview of each and discusses their advantages and disadvantages. Python - StepBySteps An index of StepBySteps for the Python guide site. Python Regex: Characters Python's regular expression (regex) engine is very powerful. This page discusses special characters. Shelve-ing Python Objects 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. XRange Type 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. RegEx MatchObjects Python's [b]re[/b] 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 Warnings Python's built-in warnings are important to know. Here is a list of them. String Module Functions 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. RegEx Examples: Order Python's regular expression (regex) engine is very powerful. This page discusses square braces or brackets. Pt 4: Python Error Handling A Python program is not fully-functional until it crashes the way you want, handling errors. Here we see how to read Python's error messages. Regular Expression Objects Python's [b]re[/b] 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 Shell Define the "shell" Review of Beginning Python My review of "Beginning Python" RSSReader.cgi Python CGI for an RSS Reader RSSReader.php The PHP Layer for an RSS Reader Sequence Types Python supports several kinds of sequences. Here is a guide to each. Python Regex: Flags Python's regular expression (regex) engine is very powerful. This page discusses the use of parenthetical flags. Python Regex: Regex Name Tag Python's regular expression (regex) engine is very powerful. This page discusses regular expression name tags. Classes This is a glossary of the more technical terms used on About.com's Python site. RegEx Examples: the Brackets Python's regular expression (regex) engine is very powerful. This page discusses square braces or brackets. Code Craft This is the first part in a review of Pete Goodliffe's book, Code Craft. While the book does not address Python programming in particular, it covers industry best practices and empowers the reader to write excellent software. RSS Reader Code This page links to the source code for the tutorial series on building an RSS Reader with Python. Python - Profiles An index of Profiles for the Python guide site. Python Regex: the Pipe Python's regular expression (regex) engine is very powerful. This page discusses the pipe. RegEx Examples: () Python's regular expression (regex) engine is very powerful. This page discusses square braces or brackets. GUI GUI stands for [link url=http://python.about.com/od/programmingglossary/g/graphinterfdef.htm][b]G[/b]raphic [b]U[/b]ser [b]I[/b]nterface[/link]. For an example, see...[more] RegEx Examples: \S Python's regular expression (regex) engine is very powerful. This page discusses square braces or brackets. Rapid Web Apps with TurboGears TurboGears is one of the main web application frameworks written for Python programmers. This book will help you use it to its fullest Truth Value Testing 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 Iterators Python's iterators are very powerful and helpful. Here is a guide to the iterator protocol used in Python. Python Regex: Curly Braces Python's regular expression (regex) engine is very powerful. This page discusses curly braces. RegEx Examples: Equality Python's regular expression (regex) engine is very powerful. This page shows how to express equality. Python Regex: the Carat Python's regular expression (regex) engine is very powerful. This page discusses the carat symbol. HTML and CSS for Calendar This page contains the HTML and CSS needed for the tutorial on creating calendars in Python. |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


