Code

The code module interprets base classes, supporting operations that pertain to Python code objects. In other words, it can simulate the standard interpreter's interactive mode.

The next code opens a new interpreter within your interpreter:

>>> interpreter = code.InteractiveConsole() >>> interpreter.interact()

Last updated on 1/30/2002 Python Developer's Handbook, © 2002 Sams Publishing

< BACK Make Note | Bookmark CONTINUE >

0 0

Post a comment