[gedit] [python 3] fix some syntax errors
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] [python 3] fix some syntax errors
- Date: Thu, 3 Feb 2011 10:09:15 +0000 (UTC)
commit bb1b22e19c31898b81a98545b501e6d97a5bebe4
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Feb 3 00:53:36 2011 +0100
[python 3] fix some syntax errors
plugins/pythonconsole/pythonconsole/console.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/pythonconsole/pythonconsole/console.py b/plugins/pythonconsole/pythonconsole/console.py
index 6a59168..d3b96f3 100644
--- a/plugins/pythonconsole/pythonconsole/console.py
+++ b/plugins/pythonconsole/pythonconsole/console.py
@@ -382,9 +382,9 @@ class PythonConsole(Gtk.ScrolledWindow):
try:
r = eval(command, self.namespace, self.namespace)
if r is not None:
- print `r`
+ print(r)
except SyntaxError:
- exec command in self.namespace
+ exec(command in self.namespace)
except:
if hasattr(sys, 'last_type') and sys.last_type == SystemExit:
self.destroy()
@@ -414,8 +414,8 @@ class OutFile:
def readlines(self): return []
def write(self, s): self.console.write(s, self.tag)
def writelines(self, l): self.console.write(l, self.tag)
- def seek(self, a): raise IOError, (29, 'Illegal seek')
- def tell(self): raise IOError, (29, 'Illegal seek')
+ def seek(self, a): raise IOError((29, 'Illegal seek'))
+ def tell(self): raise IOError((29, 'Illegal seek'))
truncate = tell
# ex:et:ts=4:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]