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

Skip to content

Commit bdf00c4

Browse files
committed
disable non-functional interactive.py demo: print message and exit.
Otherwise, this demo will hang. svn path=/trunk/matplotlib/; revision=8467
1 parent 069f78e commit bdf00c4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

examples/user_interfaces/interactive.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/usr/bin/env python
22
"""Multithreaded interactive interpreter with GTK and Matplotlib support.
33
4+
WARNING:
5+
As of 2010/06/25, this is not working, at least on Linux.
6+
I have disabled it as a runnable script. - EF
7+
8+
49
Usage:
510
611
pyint-gtk.py -> starts shell with gtk thread running separately
@@ -183,7 +188,7 @@ class MatplotLibInterpreter(GTKInterpreter):
183188
specific GTK hooks in it."""
184189

185190
def __init__(self,banner=None):
186-
banner = """\nWelcome to matplotlib, a matlab-like python environment.
191+
banner = """\nWelcome to matplotlib, a MATLAB-like python environment.
187192
help(matlab) -> help on matlab compatible commands from matplotlib.
188193
help(plotting) -> help on plotting commands.
189194
"""
@@ -221,6 +226,9 @@ def pre_interact(self):
221226
matplotlib.interactive(1) # turn on interaction
222227

223228
if __name__ == '__main__':
229+
print "This demo is not presently functional, so running"
230+
print "it as a script has been disabled."
231+
sys.exit()
224232
# Quick sys.argv hack to extract the option and leave filenames in sys.argv.
225233
# For real option handling, use optparse or getopt.
226234
if len(sys.argv) > 1 and sys.argv[1]=='-pylab':

examples/user_interfaces/interactive2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
2626
Welcome to matplotlib.
2727
28-
help(matplotlib) -- shows a list of all matlab(TM) compatible commands provided
28+
help(matplotlib) -- some general information about matplotlib
2929
help(plotting) -- shows a list of plot specific commands
3030
3131
"""

0 commit comments

Comments
 (0)