I've provided this excellent language interpreter as a conda package. For users of conda, you can install it (on Linux) with:
conda install -c davidmertz python=0.9
(perhaps put it in a different environment than base).
I'm embarrassed by how much effort that took me. I used to teach conda-build at Anaconda, but I've forgotten everything about how it works. There may have been another way to do it, but what this installs uses a hack. There might have been some other way to do this, but:
% cat `which python` #!/bin/bash PYTHONPATH=$CONDA_PREFIX/lib/ python-0.9.1
The manpage works though. As Skip pointed out to me privately, there are some minor limitations with this version. E.g.:
% python
import glob import sys print 'hello'
hello
print 2+2
4
print 2*2
Unhandled exception: run-time error: integer overflow Stack backtrace (innermost last): File "<stdin>", line 1
It's easy enough to work around that though:
def mult(a, b):
... total = 0 ... for _ in range(a): ... total = total + b ... return total ...
mult(2, 2)
4
On Tue, Feb 16, 2021 at 10:01 PM Skip Montanaro skip.montanaro@gmail.com wrote:
A note to webmaster@python.org from an astute user named Hiromi in Japan* referred us to Guido's shell archives for the 0.9.1 release from 1991. As that wasn't listed in the historical releases README file:
https://legacy.python.org/download/releases/src/README
I pulled the shar files (and a patch), then made a few tweaks to get it to build:
% ./python
print 'hello world!'
hello world!
import sys dir(sys)
['argv', 'exit', 'modules', 'path', 'ps1', 'ps2', 'stderr', 'stdin', 'stdout']
sys.modules
{'builtin': <module 'builtin'>; 'sys': <module 'sys'>; '__main__': <module '__main__'>}
sys.exit(0)
I then pushed the result to a Github repo:
https://github.com/smontanaro/python-0.9.1
There is a new directory named "shar" with the original files, a small README file and a compile.patch file between the original code and the runnable code.
It was a pleasant diversion for a couple hours. I was tired of shovelling snow anyway... Thank you, Hiromi.
Skip
- Hiromi is bcc'd on this note in case he cares to comment. I didn't want
to publish his email beyond the bounds of the webmaster alias without his permission.
Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/VZYELIYA... Code of Conduct: http://python.org/psf/codeofconduct/