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
1=== modified file 'elisa-core/elisa/core/'
2--- elisa-core/elisa/core/ 2009-07-22 14:02:11 +0000
3+++ elisa-core/elisa/core/ 2009-12-14 18:47:13 +0000
4@@ -430,7 +430,22 @@
5 self.warning("IPython not available, --shell option " \
6 "ignored")
7 else:
8+ # Starting from 2.16, PyGTK has an interactive event
9+ # loop. We need to switch it off before starting
10+ # IPython's own event loop to avoid the two event loops
11+ # interfering with each other, as is done in
12+ # IPython.Shell.IPShellGTK's __init__. See
13+ # for
14+ # details.
15+ import gtk
16+ try:
17+ gtk.set_interactive(False)
18+ except AttributeError:
19+ # PyGTK < 2.16
20+ pass
22 IPShellEmbed([])()
24 reactor.callInThread(start_shell)
25 return result


People subscribed via source and target branches