mirror of
https://github.com/tromey/gdb-gui.git
synced 2025-12-16 15:10:06 +01:00
make it work with both python2 and python3
I ran 2to3, fixed up the output a tiny bit, and fixed the C module as well. I smoke tested with both versions of Python but didn't use it in anger yet. Fix #29
This commit is contained in:
@@ -70,15 +70,15 @@ class _ToplevelState(object):
|
||||
def display(self):
|
||||
with self.toplevel_lock:
|
||||
if len(self.toplevels) == 0:
|
||||
print "No windows"
|
||||
print("No windows")
|
||||
return
|
||||
|
||||
print ' Num Name'
|
||||
print(' Num Name')
|
||||
for winno in range(1, self.next_toplevel):
|
||||
if winno in self.toplevels:
|
||||
window = self.toplevels[winno]
|
||||
print ' %3d %s' % (window.number,
|
||||
window.window.get_title())
|
||||
print(' %3d %s' % (window.number,
|
||||
window.window.get_title()))
|
||||
|
||||
@in_gtk_thread
|
||||
def _do_set_font(self, font_name):
|
||||
@@ -123,7 +123,7 @@ class _ToplevelState(object):
|
||||
|
||||
@in_gtk_thread
|
||||
def windows(self):
|
||||
return self.toplevels.values()
|
||||
return list(self.toplevels.values())
|
||||
|
||||
state = _ToplevelState()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user