9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] new python posted
@ 2002-09-10  6:46 Russ Cox
  0 siblings, 0 replies; only message in thread
From: Russ Cox @ 2002-09-10  6:46 UTC (permalink / raw)
  To: 9fans

the changes i remember:

better utf support

	>>> '☺'
	'☺'
	>>>

an implementation of the dial(2) routines

	>>> from plan9 import *
	>>> dial('tcp!sources.cs.bell-labs.com!9fs')
	(5, '/net/tcp/51', -1)
	>>> close(5)
	None
	>>>

a simulation of sockets above the dial routines

	>>> import _socket
	>>> s=_socket.socket()
	>>> s.connect(('sources.cs.bell-labs.com', 564))
	>>> s.close()
	>>>

the socket simulation is minimal but good enough to run the
various HTTPServer classes in /sys/lib/python

	% cd /tmp; python /sys/lib/python/SimpleHTTPServer.py
	...

the environment doesn't pick up extra nul bytes,
supports assignment, and knows about rc-style lists

	>>> from plan9 import *
	>>> environ['path']
	['.', '/bin']
	>>> environ['path'] = ['.', '/bin', '/tmp']

importing subclasses (subdirectories of /sys/lib/python)
works now too.

russ



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-10  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-10  6:46 [9fans] new python posted Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).