[Python-Dev] At the interactive port

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Tue, 2 May 2000 07:39:12 +0300 (IDT)

> Thanks for bringing this up again.  I think it should be called
> sys.displayhook.

That should be the easy part -- I'll do it as soon as I'm home.

> The default could be something like
> import __builtin__
import sys # Sorry, I couldn't resist
> def displayhook(obj):
>     if obj is None:
>         return
>     __builtin__._ = obj
>     sys.stdout.write("%s\n" % repr(obj))

This brings up a painful point -- the reason I haven't wrote the default
is because it was way much easier to write it in Python. Of course, I
shouldn't be preaching Python-is-easier-to-write-then-C here, but  it
pains me Python cannot be written with more Python and less C.

A while ago we started talking about the mini-interpreter idea, which
would then freeze Python code into itself, and then it sort of died out.
What have become of it?

Moshe Zadka <moshez@math.huji.ac.il>
http://www.linux.org.il -- we put the penguin in .com