Merge lp:~osomon/moovida/shell into lp:moovida

Proposed by Olivier Tilloy
Status: Needs review
Proposed branch: lp:~osomon/moovida/shell
Merge into: lp:moovida
Diff against target: 25 lines (+15/-0)
1 file modified
elisa-core/elisa/core/ (+15/-0)
To merge this branch: bzr merge lp:~osomon/moovida/shell
Reviewer Review Type Date Requested Status
Moovida Developers Pending
Review via email:
To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

This fixes bug #496569 whereby, on recent linux distributions (shipping PyGTK >= 2.16), Moovida fails to start with the --shell option.

Note that this currently doesn't affect the windows version of Moovida as the current windows build includes PyGTK 2.14.2, and it doesn't ship IPython anyway.

The careful reviewer will make sure that the patch actually fixes the startup on e.g. Ubuntu Karmic, provides the developer an IPython shell, and doesn't introduce regressions on older distributions (e.g. Ubuntu Hardy).

Unmerged revisions

1607. By Olivier Tilloy

Switch off PyGTK's interactive event loop before starting IPython's own event loop
to avoid the two event loops interfering with each other.
This fixes the startup of Moovida with the --shell option with PyGTK >= 2.16.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'elisa-core/elisa/core/'
--- elisa-core/elisa/core/ 2009-07-22 14:02:11 +0000
+++ elisa-core/elisa/core/ 2009-12-14 18:47:13 +0000
@@ -430,7 +430,22 @@
430 self.warning("IPython not available, --shell option " \430 self.warning("IPython not available, --shell option " \
431 "ignored")431 "ignored")
432 else:432 else:
433 # Starting from 2.16, PyGTK has an interactive event
434 # loop. We need to switch it off before starting
435 # IPython's own event loop to avoid the two event loops
436 # interfering with each other, as is done in
437 # IPython.Shell.IPShellGTK's __init__. See
438 # for
439 # details.
440 import gtk
441 try:
442 gtk.set_interactive(False)
443 except AttributeError:
444 # PyGTK < 2.16
445 pass
433 IPShellEmbed([])()447 IPShellEmbed([])()
434 reactor.callInThread(start_shell)449 reactor.callInThread(start_shell)
435 return result450 return result


People subscribed via source and target branches