Using Python - University of Nevada, Reno

Using Python

Release 2.6.4

Guido van Rossum Fred L. Drake, Jr., editor

January 04, 2010

Python Software Foundation Email: docs@

CONTENTS

1 Command line and environment

3

1.1 Command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 Environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Using Python on Unix platforms

11

2.1 Getting and installing the latest version of Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2 Building Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.3 Python-related paths and files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.4 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.5 Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Using Python on Windows

15

3.1 Installing Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2 Alternative bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3 Configuring Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.4 Additional modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.5 Compiling Python on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.6 Other resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Using Python on a Macintosh

21

4.1 Getting and Installing MacPython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 The IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.3 Installing Additional Python Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.4 GUI Programming on the Mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.5 Distributing Python Applications on the Mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.6 Application Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.7 Other Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

A Glossary

25

B About these documents

31

B.1 Contributors to the Python Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

C History and License

33

C.1 History of the software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

C.2 Terms and conditions for accessing or otherwise using Python . . . . . . . . . . . . . . . . . . . . . 34

C.3 Licenses and Acknowledgements for Incorporated Software . . . . . . . . . . . . . . . . . . . . . . 36

D Copyright

45

i

Index

47

ii

Using Python, Release 2.6.4

This part of the documentation is devoted to general information on the setup of the Python environment on different platform, the invocation of the interpreter and things that make working with Python easier.

CONTENTS

1

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download