Thursday, May 29, 2008

Python Reference Manual

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built into the structures of data, combined with the dynamic typing and dynamic binding, it is very attractive for rapid development of applications, and for use as a script language or glue to connect existing components .

Python is simple, easy to learn syntax emphasizes readability and, therefore, reduced the cost of maintaining the program. Python supports modules and packages, a program that encourages modularity and reuse of code. The Python interpreter and extensive standard library are available in source or binary free of charge for all major platforms, and can be freely distributed.

This reference manual describes the syntax and \ semantic core "of language. It is terse, but attempts to be accurate and complete. The semantics of non-essential built-in types of objects and integrated functions and modules are described in the Python Library Reference. For an informal introduction to the language, see the tutorial Python. For C or C + +, two other textbooks exist: Extending and Embedding the Python interpreter describes the high level of know how to write a Plug Python and Python / C API Reference Manual describes the interfaces available in C / C + + in detail.

This reference manual describes the programming language Python. It is not a tutorial. Even if I am being as specific as possible, I chose to use English rather than formal specifications for everything except the syntax and parse.

This should make the document more understandable to the average reader, but leave room for ambiguity. Therefore, if you were from Mars and tried to re-apply Python this document alone, you may guess things and, indeed, you would probably end with the implementation quite a different language. On the other hand, if you use Python and wonder what the precise rules on a particular language, you should definitely be able to find them here. If you want to see a more formal language, you could perhaps volunteer your time or invent a machine to clone :-).

It is dangerous to add too many details of implementation of a reference document language May implementing change, and other implementations of the same working language diferrently May. On the other hand, there are currently only Python application used on a large scale (although there is now a second!), And in particular quirks are sometimes worth mentioning, especially when the implementation imposes new limits. Therefore, you will find short \ application note "sprinkled throughout the text.

Each application Python comes with a number of systems and modules standards. They are not documented here, but in different Python Library Reference document. Some built-in modules are mentioned if they interact meaningfully with the language definition.

Download Python Reference Manual

Non-Programmers Tutorial For Python

Non-Programmers Tutorial For Python is a tutorial designed to be a introduction to the Python programming language. This guide is for someone with no programming experience.

So, you’ve never programmed before. As we go through this tutorial I will attempt to teach you how to program. There really is only one way to learn to program. You must read code and write code. I’m going to show you lots of code. You should type in code that I show you to see what happens. Play around with it and make changes. The worst that can happen is that it won’t work. When I type in code it will be formatted like this:

##Python is easy to learn
print “Hello, World!”

That’s so it is easy to distinguish from the other text. To make it confusing I will also print what the computer outputs in that same font.

Now, on to more important things. In order to program in Python you need the Python software. If you don’t already have the Python software go to http://www.python.org/download/ and get the proper version for your platform. Download it, read the instructions and get it installed.

First you need to download the appropriate file for your computer from http://www.python.org/download. Go to the 2.0 link (or newer) and then get the windows installer if you use Windows or the rpm or source if you use Unix. TheWindows installer will download to file. The file can then be run by double clicking on the icon that is downloaded. The installation will then proceed.

If you get the Unix source make sure you compile in the tk extension if you want to use IDLE.

Download Non-Programmers Tutorial For Python

A Byte of Python

This book serves as a guide or tutorial to the Python programming language. It is intended to help both newbies as well as experienced programmers to learn and get started with Python.

If all you know about computers is how to save text files, then you can learn Python from this book. If you have previous programming experience, then you can learn Python from this book also.

If you do have previous programming experience, you will be interested in the differences between Python and your favorite programming language and I have highlighted many such differences for you. A little warning though, Python is soon going to become your favorite programming language!

Python is one of those rare languages which can claim to be both simple and powerful. You will be pleasantly surprised to see how easy it is to concentrate on the solution to the problem rather than on the syntax (i.e. the structure of the program that you are writing) of the language.

The official Python introduction is
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

I will discuss these features in more detail in the next section. By the way, Guido van Rossum (the creator of the Python language) named the language after the BBC show “Monty Python’s Flying Circus”. He doesn’t particularly like snakes that kill animals for food by winding their long bodies around them and crushing them.

Download A Byte of Python

Wednesday, May 28, 2008

Dive into Python

If you use an account hosted on a server, your ISP May have already installed Python. The most popular Linux distributions come with Python in the default installation.

Mac OS X 10.2 and later includes a command line version of Python, though you probably need to install a version that includes a more Mac-like graphical interface. Windows does not come with any version of Python, but do not despair! There are several ways to point and click on your way to Python on Windows.

As you can see already, Python runs on many operating systems. The full list includes Windows, Mac OS, Mac OS X, and all varieties of free Unix-compatible systems such as Linux. There are also versions that run on Sun Solaris, AS/400, Amiga, OS / 2, BeOS, and a plethora of other platforms that you've probably never heard of. What's more, programs written in Python on a platform, with a little care, running on any supported platform. For example, I regularly Python develop programs under Windows, then deploy them on Linux. Returning to the question that began this section, "What Python is good for you?" The answer is one that operates on the computer you already own.

ActiveState is an installer for Windows called ActivePython Python, which includes a full version of Python, an IDE with a Python-aware code editor, and some extensions for Windows Python which allow full access to Windows on services, API, and the Windows registry. ActivePython be downloaded for free, but it is not open source. He is the IDE I used to learn Python, and I recommend you try, unless you have a specific reason not to. One of those reasons might be that ActiveState is usually several months late in updating their installation when ActivePython new version of Python are released. If you absolutely need the latest version of Python and ActivePython is still behind a version you read this, you'll need to use the second option for the installation of Python on Windows.

The second option is the "official" Python installation, distributed by the people who develop Python itself. It is freely downloadable open source, and is still underway with the latest version of Python.

Download Dive into Python

Text Processing in Python

This chapter discusses Python capabilities that are likely to be used in text processing applications. For an introduction to Python syntax and semantics per se, readers might want to skip ahead to Appendix A (A Selective and Impressionistic Short Review of Python); Guido van Rossum\’s _Python Tutorial_ at is also quite excellent. The focus here occupies a somewhat higher level: not the Python language narrowly, but also not yet specific to text processing.

Download Text Processing in Python

Python Imaging Library Handbook

Python Imaging Library image processing adds functionality to your library Python interpreter.This provides file formats, an effective internal representation, and quite powerful image processing capabilities.

The library image database is designed for rapid access to data stored in a small number of pixel formats. It should provide a solid foundation for a great tool for image processing.

Download Python Imaging Library Handbook

How to Think Like a Computer Scientist - Learning with Python

The process of translating and using How to Think Like a Computer Scientist for the past two years has conrmed Python\’s suitability for teaching beginning students. Python greatly simplies programming examples and makes important programming ideas easier to teach.

Download Learning with Python