Python Language FAQ - Section 1

This FAQ newsgroup posting has been automatically converted from an HTML snapshot of the original Python FAQ; please refer to the original "Python FAQ Wizard" at <http://grail.cnri.reston.va.us/cgi-bin/faqw.py> if source code snippets given in this document do not work - incidentally some formatting information may have been lost during the conversion. ---------------------------------------------------------------------------- The whole Python FAQ - Section 1 Last changed on Mon Jun 28 19:36:09 1999 EDT (Entries marked with ** were changed within the last 24 hours; entries marked with * were changed within the last 7 days.) ---------------------------------------------------------------------------- 1. General information and availability 1.1. What is Python? 1.2. Why is it called Python? 1.3. How do I obtain a copy of the Python source? 1.4. How do I get documentation on Python? 1.5. Are there other ftp sites that mirror the Python distribution? 1.6. Is there a newsgroup or mailing list devoted to Python? 1.7. Is there a WWW page devoted to Python? 1.8. Is the Python documentation available on the WWW? 1.9. Are there any books on Python? 1.10. Are there any published articles about Python that I can reference? 1.11. Are there short introductory papers or talks on Python? 1.12. How does the Python version numbering scheme work? 1.13. How do I get a beta test version of Python? 1.14. Are there copyright restrictions on the use of Python? 1.15. Why was Python created in the first place? 1.16. Do I have to like "Monty Python's Flying Circus"? 1.17. What is Python good for? 1.18. Can I use the FAQ Wizard software to maintain my own FAQ? 1.19. Which editor has good support for editing Python source code? ---------------------------------------------------------------------------- 1. General information and availability ---------------------------------------------------------------------------- 1.1. What is Python? Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many brands of UNIX, on the Mac, and on PCs under MS-DOS, Windows, Windows NT, and OS/2. To find out more, the best thing to do is to start reading the tutorial from the documentation set (see a few questions further down). See also question 1.17 (what is Python good for). ---------------------------------------------------------------------------- 1.2. Why is it called Python? Apart from being a computer scientist, I'm also a fan of "Monty Python's Flying Circus" (a BBC comedy series from the seventies, in the -- unlikely -- case you didn't know). It occurred to me one day that I needed a name that was short, unique, and slightly mysterious. And I happened to be reading some scripts from the series at the time... So then I decided to call my language Python. But Python is not a joke. And don't you associate it with dangerous reptiles either! (If you need an icon, use an image of the 16-ton weight from the TV series or of a can of SPAM :-) ---------------------------------------------------------------------------- 1.3. How do I obtain a copy of the Python source? The latest complete Python source distribution is always available by anonymous ftp, e.g. ftp://ftp.python.org/pub/python/src/python1.4.tar.gz. It is a gzipped tar file containing the complete C source, LaTeX documentation, Python library modules, example programs, and several useful pieces of freely distributable software. This will compile and run out of the box on most UNIX platforms. (See section 7 for non-UNIX information.) An index of said ftp directory can be found in the file INDEX. An HTML version of the index can be found in the file index.html, ftp://ftp.python.org/pub/python/index.html. ---------------------------------------------------------------------------- 1.4. How do I get documentation on Python? All documentation is available on-line, starting at http://www.python.org/doc/. The LaTeX source for the documentation is part of the source distribution. If you don't have LaTeX, the latest Python documentation set is available, in various formats like postscript and html, by anonymous ftp - visit the above URL for links to the current versions. PostScript for a high-level description of Python is in the file nluug-paper.ps (a separate file on the ftp site). ---------------------------------------------------------------------------- 1.5. Are there other ftp sites that mirror the Python distribution? The following anonymous ftp sites keep mirrors of the Python distribution: USA: ftp://ftp.python.org/pub/python/ ftp://gatekeeper.dec.com/pub/plan/python/ ftp://ftp.uu.net/languages/python/ ftp://ftp.wustl.edu/graphics/graphics/sgi-stuff/python/ ftp://ftp.sterling.com/programming/languages/python/ ftp://uiarchive.cso.uiuc.edu/pub/lang/python/ ftp://ftp.pht.com/mirrors/python/python/ ftp://ftp.cdrom.com/pub/python/ Europe: ftp://ftp.cwi.nl/pub/python/ ftp://ftp.funet.fi/pub/languages/python/ ftp://ftp.sunet.se/pub/lang/python/ ftp://unix.hensa.ac.uk/mirrors/uunet/languages/python/ ftp://ftp.lip6.fr/pub/python/ ftp://sunsite.cnlab-switch.ch/mirror/python/ ftp://ftp.informatik.tu-muenchen.de/pub/comp/programming/languages/python/ Australia: ftp://ftp.dstc.edu.au/pub/python/ ---------------------------------------------------------------------------- 1.6. Is there a newsgroup or mailing list devoted to Python? There is a newsgroup, comp.lang.python, and a mailing list. The newsgroup and mailing list are gatewayed into each other -- if you can read news it's unnecessary to subscribe to the mailing list. To subscribe to the mailing list (python-list@python.org) visit its Mailman webpage at http://www.python.org/mailman/listinfo/python-list More info about the newsgroup and mailing list, and about other lists, can be found at http://www.python.org/psa/MailingLists.html. Archives of the newsgroup are kept by Deja News and accessible through the "Python newsgroup search" web page, http://www.python.org/search/search_news.html. This page also contains pointer to other archival collections. ---------------------------------------------------------------------------- 1.7. Is there a WWW page devoted to Python? Yes, http://www.python.org/ is the official Python home page. ---------------------------------------------------------------------------- 1.8. Is the Python documentation available on the WWW? Yes, see http://www.python.org/ (Python's home page). It contains pointers to hypertext versions of the whole documentation set (as hypertext, not just PostScript). If you wish to browse this collection of HTML files on your own machine, it is available bundled up by anonymous ftp, e.g. ftp://ftp.python.org/pub/python/doc/html.tar.gz. An Emacs-INFO set containing the library manual is also available by ftp, e.g. ftp://ftp.python.org/pub/python/doc/lib-info.tar.gz. ---------------------------------------------------------------------------- 1.9. Are there any books on Python? Yes, several: + Internet Programming with Python by Aaron Watters, Guido van Rossum, and James Ahlstrom MIS Press/Henry Holt publishers ISBN: 1-55851-484-8 First published October, 1996 + Programming Python by Mark Lutz O'Reilly & Associates ISBN: 1-56592-197-6 First published October, 1996 + Das Python-Buch (in German) by Martin von Loewis and Nils Fischbeck Addison-Wesley-Longman, 1997 ISBN: 3-8273-1110-1 More are coming: + Python Pocket Reference by Mark Lutz O'Reilly & Associates ISBN 1-56592-500-9 1st Edition October 1998 (est.) 80 pages (est.), $6.95 (est.) ---------------------------------------------------------------------------- 1.10. Are there any published articles about Python that I can reference? If you can't reference the web site, and you don't want to reference the books (see previous question), there are several articles on Python that you could reference. Most publications about Python are collected on the Python web site: http://www.python.org/doc/Publications.html It is no longer recommended to reference this very old article by Python's author: Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers Using the Python Programming Language", CWI Quarterly, Volume 4, Issue 4 (December 1991), Amsterdam, pp 283-303. ---------------------------------------------------------------------------- 1.11. Are there short introductory papers or talks on Python? There are several - you can find links to some of them collected at http://www.python.org/doc/Hints.html#intros. ---------------------------------------------------------------------------- 1.12. How does the Python version numbering scheme work? Python versions are numbered A.B.C or A.B. A is the major version number -- it is only incremented for major changes in functionality or source structure. B is the minor version number, incremented for less earth-shattering changes to a release. C is the patchlevel -- it is incremented for each new patch release. Not all releases have patch releases. Note that in the past, patches have added significant changes; in fact the changeover from 0.9.9 to 1.0.0 was the first time that either A or B changed! Beta versions have an additional suffix of "betaN" for some small number N. Note that (for instance) all versions labeled 1.4betaN precede the actual release of 1.4. 1.4b3 is short for 1.4beta3. ---------------------------------------------------------------------------- 1.13. How do I get a beta test version of Python? If there are any beta releases, they are published in the normal source directory (e.g. ftp://ftp.python.org/pub/python/src/). Alpha releases are only open to PSA members. See http://www.python.org/psa/ for information on how to join ($50/year). ---------------------------------------------------------------------------- 1.14. Are there copyright restrictions on the use of Python? Hardly. You can do anything you want with the source, as long as you leave the copyrights in, and display those copyrights in any documentation about Python that you produce. Also, don't use the author's institute's name in publicity without prior written permission, and don't hold them responsible for anything (read the actual copyright for a precise legal wording). In particular, if you honor the copyright rules, it's OK to use Python for commercial use, to sell copies of Python in source or binary form, or to sell products that enhance Python or incorporate Python (or part of it) in some form. I would still like to know about all commercial use of Python! ---------------------------------------------------------------------------- 1.15. Why was Python created in the first place? Here's a very brief summary of what got me started: I had extensive experience with implementing an interpreted language in the ABC group at CWI, and from working with this group I had learned a lot about language design. This is the origin of many Python features, including the use of indentation for statement grouping and the inclusion of very-high-level data types (although the details are all different in Python). I had a number of gripes about the ABC language, but also liked many of its features. It was impossible to extend the ABC language (or its implementation) to remedy my complaints -- in fact its lack of extensibility was one of its biggest problems. I had some experience with using Modula-2+ and talked with the designers of Modula-3 (and read the M3 report). M3 is the origin of the syntax and semantics used for exceptions, and some other Python features. I was working in the Amoeba distributed operating system group at CWI. We needed a better way to do system administration than by writing either C programs or Bourne shell scripts, since Amoeba had its own system call interface which wasn't easily accessible from the Bourne shell. My experience with error handling in Amoeba made me acutely aware of the importance of exceptions as a programming language feature. It occurred to me that a scripting language with a syntax like ABC but with access to the Amoeba system calls would fill the need. I realized that it would be foolish to write an Amoeba-specific language, so I decided that I needed a language that was generally extensible. During the 1989 Christmas holidays, I had a lot of time on my hand, so I decided to give it a try. During the next year, while still mostly working on it in my own time, Python was used in the Amoeba project with increasing success, and the feedback from colleagues made me add many early improvements. In February 1991, after just over a year of development, I decided to post to USENET. The rest is in the Misc/HISTORY file. ---------------------------------------------------------------------------- 1.16. Do I have to like "Monty Python's Flying Circus"? No, but it helps. Pythonistas like the occasional reference to SPAM, and of course, nobody expects the Spanish Inquisition The two main reasons to use Python are: - Portable - Easy to learn The three main reasons to use Python are: - Portable - Easy to learn - Powerful standard library (And nice red uniforms.) And remember, there is no rule six. ---------------------------------------------------------------------------- 1.17. What is Python good for? Python is used in many situations where a great deal of dynamism, ease of use, power, and flexibility are required. In the area of basic text manipulation core Python (without any non-core extensions) is easier to use and is roughly as fast as just about any language, and this makes Python good for many system administration type tasks and for CGI programming and other application areas that manipulate text and strings and such. When augmented with standard extensions (such as PIL, COM, Numeric, oracledb, kjbuckets, tkinter, win32api, etc.) or special purpose extensions (that you write, perhaps using helper tools such as SWIG, or using object protocols such as ILU/CORBA or COM) Python becomes a very convenient "glue" or "steering" language that helps make heterogeneous collections of unrelated software packages work together. For example by combining Numeric with oracledb you can help your SQL database do statistical analysis, or even Fourier transforms. One of the features that makes Python excel in the "glue language" role is Python's simple, usable, and powerful C language runtime API. Many developers also use Python extensively as a graphical user interface development aide. ---------------------------------------------------------------------------- 1.18. Can I use the FAQ Wizard software to maintain my own FAQ? Sure. Version 1.0 is distributed in the Tools subdirectory of the Python 1.5 source release at http://www.python.org/ftp/python/src/py152.tgz ---------------------------------------------------------------------------- 1.19. Which editor has good support for editing Python source code? On Unix, the first choice is Emacs/XEmacs. There's an elaborate mode for editing Python code, which is available from the Python source distribution (Misc/python-mode.el). It's also bundled with XEmacs (we're still working on legal details to make it possible to bundle it with FSF Emacs). And it has its own web page: http://www.python.org/emacs/python-mode/index.html There are many other choices, for Unix, Windows or Macintosh. Richard Jones compiled a table from postings on the Python newsgroup: http://www.bofh.asn.au/~richard/editors.html See also FAQ question 7.10 for some more Mac and Win options. ---------------------------------------------------------------------------- -- ----------- comp.lang.python.announce (moderated) ---------- Article Submission Address: python-announce@python.org Python Language Home Page: http://www.python.org/ Python Quick Help Index: http://www.python.org/Help.html ------------------------------------------------------------
participants (1)
-
Markus Fleck