Hi folks,

Guy Keren wrote:
>the problem with writing things via the interactive prompt, is that 
>they "go away" when you log out. you can't look at a listing of your 
>code (or can you?) - you cannot re-edit a function (or can you?).

Using IDLE, both are possible. I personally prefer the bare interpreter.

Amit Aronovitch wrote:
> Note that this mode of operation is completely platform independent.

This means, of course, you need libreadline compiled for your platform. 
Unix/linux/*BSD have this OOB, but I couldn't find a decent readline.dll for
windows and an accompanying python module (I did find one for Python 1.5,
but hey - I ain't going back there!).

So I compiled one. It still has bugs (e.g., signal support, especially
KeyboardInterrupt, is broken) but it tab completes almost flawlessly. If
your target platform is windows (or you want the kids to be able to play
with python interpreter on windows as well), I think you could make use of
this.

R.

P.S.
Had this not been clear, I hereby join the do-it-with-the-interpreter lobby.
Explaining them scripts will get you sys.argv parsing, which is prolly out
of scope.

You can make a continuous transition to autonomous execution by this order:
1) >>> execfile("myfile.py")
2) ~ > python -i myfile.py
3) ~ > python myfile.py
4) prepend with "#! /bin/env python" and ./myfile.py

לענות