I just started messing with Python, and was having a great time with entering Tkinter GUI commands into the Python shell (ActivePython 2.5). Its fun entering commands one at a time and seeing components appear real-time (instead of normal process of having to compile the whole thing first).
Anyway, I was wondering if there was a way to paste multiple lines of source code (at once).
Also: Is there a function that causes a string to be interpreted as a command?
I suggest the standard IDLE instead. I found ActivePython lacking in features (dedent region, indent region, comment region, uncomment region) yet containing no new (useful) ones.
As for pasting multiple lines: well, you can paste multiple lines, but it only seems to evaluate the first one.
What you can instead do is nest those multiple lines in a function, and then paste it.
def test():
line1 = 'bah'
line2 = 'foo'
print line2 + line1
now type test() for the result 'foobah'
whereas
line1 = 'bah'
line2 = 'foo'
print line2 + line1
would only evaluate line1 = 'bah'
This is only marginally easier than creating an actual script, since you get to avoid creating a file just for a test.
Re using strings as commands... what's the context?
Oh, and I highly recommend wxPython over Tkinter. Much more powerful, intuitive and easy to use, IMHO. Also newer: http://www.wxpython.org/quotes.php
Note the words by Eric S. Raymond and Guido van Rossum (Python creator).