After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 366696 - Python console doesn't allow different code blocks
Python console doesn't allow different code blocks
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Plugins (other)
0.9.6
Other All
: Normal minor
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-29 08:03 UTC by Brian McKenna
Modified: 2006-10-30 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch (1.47 KB, patch)
2006-10-29 08:19 UTC, Brian McKenna
none Details | Review
Updated patch (1.50 KB, patch)
2006-10-29 09:16 UTC, Brian McKenna
committed Details | Review

Description Brian McKenna 2006-10-29 08:03:24 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):
  • File "/usr/lib/rhythmbox/plugins/python-console/pythonconsole.py", line 340 in __run
    exec command in self.namespace
  • File "<string>", line 1
    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:
Comment 1 Brian McKenna 2006-10-29 08:19:02 UTC
Created attachment 75598 [details] [review]
A patch
Comment 2 Brian McKenna 2006-10-29 09:16:24 UTC
Created attachment 75603 [details] [review]
Updated patch

The last patch didn't handle escaping a newline correctly.
Comment 3 James "Doc" Livingston 2006-10-30 11:26:26 UTC
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.