GNOME Bugzilla – Bug 366696
Python console doesn't allow different code blocks
Last modified: 2006-10-30 11:26:26 UTC
Please describe the problem: Rhythmbox's default Python console plugin prevents the user from inputting a code block such as if, else, try, def, etc. This is because the plugin passes each line to Python and not each block. Steps to reproduce: 1. Load the plugin and open the console window. 2. Type in "if True:" 3. Press enter. Actual results: The plugin passes the line as a command. This results in an error; Traceback (most recent call last):
+ Trace 79607
exec command in self.namespace
if True:
Expected results: The plugin should ask for the next line of the code block until the user enters a blank line. Like so: >>> if True: ... print "Done" ... Done Does this happen every time? Yes Other information:
Created attachment 75598 [details] [review] A patch
Created attachment 75603 [details] [review] Updated patch The last patch didn't handle escaping a newline correctly.
Committed to cvs, thanks. If you haven't already, it would be good to file a bug about this against Gedit, since that's where our console is stolen from.