Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Beta testers wanted for Python 0.9.2

37 views
Skip to first unread message

Guido van Rossum

unread,
Aug 13, 1991, 3:48:51 AM8/13/91
to
(If you don't know what Python is, a blurb is attached to the end of
this article.)

I am getting ready to release the next Python version to the net, but
before I do, I'd like to receive comments on it from a few dedicated
people who'd like to port it to as many machines as possible and tell
me what went wrong... You need to have ftp access since the thing is
really too big to mail in shar form. You should also have TeX and
LaTeX since most of the documentation is in LaTeX form. Mail me
a.s.a.p. if you're interested -- I am leaving for a holiday next week.

Relevant machines are: all UNIX machines, especially SGI machines
(there's a whole bunch of optional SGI-specific graphics stuff) or
machines running X11 (there's an interface to that using my STDWIN
library); the Mac; MS-DOS. Porting to the latter two is harder
because of the different compilers; I use Think C 4.02 on the Mac, and
in principle it should compile using TurboC on the PC. If you're
interested in porting to other machines you're welcome, but it should
be fairly powerful -- my Mac Plus with 1 Meg RAM and a 20 Meg hard
disk is really the bottom line...

If you know Python 0.9.1, here's a summary of the most important
changes since then:

- tutorial now (almost) complete; library reference reorganized
- new syntax: continue statement; semicolons; dictionary constructors;
restrictions on blank lines in source files removed
- dramatically improved module load time through precompiled modules
- arbitrary precision integers: compute 2 to the power 1000 and more...
- arithmetic operators now accept mixed type operands, e.g., 3.14/4
- more operations on list: remove, index, reverse; repetition
- improved/new file operations: readlines, seek, tell, flush, ...
- process management added to the posix module: fork/exec/wait/kill etc.
- BSD socket operations (with example servers and clients!)
- many new STDWIN features (color, fonts, polygons, ...)
- new SGI modules: font manager and FORMS library interface

--Guido van Rossum, CWI, Amsterdam <gu...@cwi.nl>
"Oh mother, don't be so sentimental. Things explode every day."

----------------------------------------------------------------------
Promised Python blurb:

Python is an interpreted prototyping language, incorporating 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. It is also usable as
an extension language for applications that need a programmable
interface.

As a short example of what Python looks like, here's a script to
print prime numbers (not blazingly fast, but readable!). When this
file is made executable, it is callable directly from the UNIX shell.

#! /usr/local/python

# Print prime numbers in a given range

def main():
import sys
min, max = 2, 0x7fffffff
if sys.argv[1:]:
min = int(eval(sys.argv[1]))
if sys.argv[2:]:
max = int(eval(sys.argv[2]))
primes(min, max)

def primes(min, max):
if 2 >= min: print 2
primes = [2]
i = 3
while i <= max:
for p in primes:
if i%p = 0 or p*p > i: break
if i%p <> 0:
primes.append(i)
if i >= min: print i
i = i+2

main()

0 new messages