From: email@example.com (Guido van Rossum)
Reply-to: firstname.lastname@example.org (Guido van Rossum)
Expires: Wed, 1 Nov 1995 00:00:00 GMT
Submitted-by: Guido van Rossum <email@example.com>
-Last-modified: 28 September 1995
+Last-modified: 11 October 1995
This article contains answers to Frequently Asked Questions about
Python (an object-oriented interpreted programming language -- see
with permission of the author. No warranties.
- 1895 Preston White Drive
+ 1895 Preston White Drive
Email: <firstname.lastname@example.org>, <email@example.com>, <firstname.lastname@example.org>
The latest version of this FAQ is available by anonymous ftp from
python/FAQ>. It will also be posted
+<URL:ftp://ftp.python.org/pub//FAQ>. It will also be posted
regularly to the newsgroups comp.answers <URL:news:comp.answers> and
A. The following anonymous ftp sites keep mirrors of the Python
Or try archie on the string "python".
1.6. Q. Is there a newsgroup or mailing list devoted to Python?
couple of years ago, Tim lost his email access. He hasn't surfaced
PS: support for Python's Emacs mode (Misc/python-mode.el in the
distribution) has been taken up by Barry Warsaw. Questions about it
retrieval service <URL:http://www.infoseek.com/>. Contact:
-Michael Powers of daVinci Time & Space is "writing tons-o-python for
-interactive television entertainment." Contact: <email@example.com>.
Paul Everitt of Connecting Minds is planning a Lotus Notes gateway.
Contact: <Paul.Everitt@cminds.com>. Or see their WWW server
A. Very stable. While the current version number would suggest it is
in the early stages of development, in fact new, stable releases
-(numbered 0.9.x through 1.
2) have been coming out roughly every 3 to
+(numbered 0.9.x through 1.) have been coming out roughly every 3 to
6 months for the past four years.
2.5. Q. When will the next version be released?
-A. I am planning to release 1.3 in early October 1995. It will
-contain keyword parameters as the most important new language feature.
-A beta version was made available in August, more beta versions may
+A. Version 1.3 is being released on 13 October 1995. It is too early
+to predict when the next release will be necessary, but you can expect
+something awesome within half a year!
2.6. Q. What new developments are expected for Python in the future?
to a subprocess's standard input and output, here's a simple solution,
MAXFD = 100 # Max number of file descriptors in this system
+MAXFD = 100# Max number of file descriptors in this system
- cmd = string.split(cmd)
- p2cread, p2cwrite = os.pipe()
- c2pread, c2pwrite = os.pipe()
- if os.dup(p2cread) <> 0:
- sys.stderr.write('popen2: bad read dup\n')
- if os.dup(c2pwrite) <> 1:
- sys.stderr.write('popen2: bad write dup\n')
- for i in range(3, MAXFD):
- tochild = os.fdopen(p2cwrite, 'w')
- fromchild = os.fdopen(c2pread, 'r')
- return fromchild, tochild
+ cmd = string.split(cmd)
+ p2cread, p2cwrite = os.pipe()
+ c2pread, c2pwrite = os.pipe()
+ if os.dup(p2cread) <> 0:
+ sys.stderr.write('popen2: bad read dup\n')
+ if os.dup(c2pwrite) <> 1:
+ sys.stderr.write('popen2: bad write dup\n')
+ for i in range(3, MAXFD):
+ tochild = os.fdopen(p2cwrite, 'w')
+ fromchild = os.fdopen(c2pread, 'r')
+ return fromchild, tochild
Note that many interactive programs (e.g. vi) don't work well with
pipes substituted for standard input and output. You will have to use
A. Assuming you're already using python-mode and font-lock-mode
separately, all you need to do is put this in your .emacs file:
- (defun my-python-mode-hook ()
- (setq font-lock-keywords python-font-lock-keywords)
- (add-hook 'python-mode-hook 'my-python-mode-hook)
+ (defun my-python-mode-hook ()
+ (setq font-lock-keywords python-font-lock-keywords)
+ (add-hook 'python-mode-hook 'my-python-mode-hook)
4.33. Q. Is there an inverse to the format operator (a la C's scanf())?
- you must have installed Python fully:
6.14. Q. Why doesn't Python use proper garbage collection?
Python) will run out of file descriptors long before it runs out of
- for file in <very long list of files>:
+ for file in <very long list of files>:
Using the current reference counting and destructor scheme, each new
assignment to f closes the previous file. Using GC, this is not