[Stackless] Example stackless REPL?
Richard Tew
richard.m.tew at gmail.com
Thu May 31 08:43:59 CEST 2012
On Thu, May 31, 2012 at 6:25 PM, Adam Preble <adam.preble at gmail.com> wrote:
> I was curious if anybody had any implementations of the Python REPL that was
> Stackless-friendly. I wanted to embed a Python console in my application
> while managing the runtime through Stackless Python. The main problem with
> the code module or even the cmd module is the blocking line reading calls.
> The best alternative I've seen is some non-standard keyboard polling that
> lets me defer to schedule() when there's nothing going on. With just the
> code module I see I'll have to re-implement a lot of stuff. I only found
> out about the cmd module tonight and I'm inclined to try to quickly distort
> an example Python REPL to cooperate with it, but I'd rather not if I can
> avoid it.
No known implementations. I looked into it back in 2005 and was
unable to come up with a viable solution at the time.
The only way I could see it happening offhand is the cmd module and
overriding it to avoid raw_input, and use stdin/stdout instead. And
also monkey-patching stdin and stdout to be opaquely non-blocking and
stackless compatible.
Cheers,
Richard.
More information about the Stackless
mailing list