On 10/29/05, RaeNye <[EMAIL PROTECTED]> wrote:

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!).

As we painfuly learned in the August meeting, OS-X python comes without readline too...

For windows, cygwin includes a good interpreter with readline (a minimal install would probably work fine - if you don't mind calling your disk /cygdrive/c/ instead of C:\\ ).
 Another option I was using long time ago, is using the python mode from xemacs (the native port) (I was also using xemacs shell-mode for commandline, since the native "dos window" was really lousy).

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.

I got the impression that for this course we wish to avoid installations on the windows machines (would probably use putty to ssh to the linux server).
However, maybe this dll would be useful to some of this list's subscribers - please post some references.
 
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.

 Writing scripts is an important target skill, and argv parsing is part of it. Still, with the interpreter approach we have the *option* to avoid it, or leave it as an extra "home lesson".
 There's also optparse. It's a fairly complicated module, but code using it might be more readable than "manual" parsing. It might be out of scope for the lessons, but if we choose the "homework" approach it might be appropriate (also a nice demonstration of using standard libraries - yet another target skill).

לענות