On Mon, 11 Aug 2008 17:26:56 +0200, Stef Mientki wrote: > I'm trying to make an editor with an integrated Shell. ... > Is this the (most) correct / elegant way, or are there better solutions > ?
The best solution is not to re-invent the wheel: "import code" is the way to emulate Python's interactive interpreter. Try running "python -m code" at a regular shell (not the Python shell, your operating system's shell). Doing a search of the file code.py, I don't find the string "eval" at all. My guess is that your approach is probably not the best way. -- Steven -- http://mail.python.org/mailman/listinfo/python-list