Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0140f32

Browse files
committed
make embedding_in_qt4.py work with python-3
1 parent 2f2ae95 commit 0140f32

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/user_interfaces/embedding_in_qt4.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def compute_initial_figure(self):
6464

6565
def update_figure(self):
6666
# Build a list of 4 random integers between 0 and 10 (both inclusive)
67-
l = [ random.randint(0, 10) for i in xrange(4) ]
67+
l = [ random.randint(0, 10) for i in range(4) ]
6868

6969
self.axes.plot([0, 1, 2, 3], l, 'r')
7070
self.draw()
@@ -107,16 +107,16 @@ def closeEvent(self, ce):
107107
self.fileQuit()
108108

109109
def about(self):
110-
QtGui.QMessageBox.about(self, "About %s" % progname,
111-
u"""%(prog)s version %(version)s
112-
Copyright \N{COPYRIGHT SIGN} 2005 Florent Rougon, 2006 Darren Dale
110+
QtGui.QMessageBox.about(self, "About",
111+
"""embedding_in_qt4.py example
112+
Copyright 2005 Florent Rougon, 2006 Darren Dale
113113
114114
This program is a simple example of a Qt4 application embedding matplotlib
115115
canvases.
116116
117117
It may be used and modified with no restriction; raw copies as well as
118118
modified versions may be distributed without limitation."""
119-
% {"prog": progname, "version": progversion})
119+
)
120120

121121

122122
qApp = QtGui.QApplication(sys.argv)

0 commit comments

Comments
 (0)