On Oct 28, 2003, at 10:10 AM, Ronald Oussoren wrote:
> On 28 okt 2003, at 8:11, Bob Ippolito wrote:
>> PyInterpreter is a set of PyObjC classes (and a nib) that makes it
>> easy to put an interactive Python interpreter into just about any
>> PyObjC application. It supports the following features:
>> Colored stdout / stderr
>> raw_input() / stdin.readline() support via modal dialog (a la
>> command history
>> completion (OS X 10.3 and later only)
>> Feel free to use this in your own projects, I'm hoping to get this
>> into the PyObjC Examples tree sometime in the near future.
> I like this, except the raw_input part. I "accidently" typed help() in
> the interpreter, which mostly showed that the modal dialog is not a
> good idea. A sheet would have been even worse :-).
It's the only way to do input.. unless you know some way to do
stackless-like-things without stackless.. I don't know how to wrap the
inner-interpreter with something that allows me to provide
sys.stdin.readline() info asynchronously. I sure can't do it with
threads, unless the inner-interpreter always runs in a thread, and that
will make everything so much more complicated and harder to test.
In any case, the readline support can be turned off pretty easily if
you look at the source.. it's just one line that you'd change to None.
> W.r.t. getting this into the PyObjC examples: it might be more usefull
> to add this, and more IDE-components (like a class browser), to
> PyObjCTools as this would make it even easier to reuse these
Probably, but you have the nib issue (bundlebuilder won't like that).