From: Michael H. <mh...@al...> - 2009-08-10 08:25:43
|
Samuel H. Dupree, Jr. wrote: > I'm attempting to run Gnuplot in Python under IDLE. I'm running Python > version. 2.5 on a Power Mac G4 under Mac OS X, version 10.4.11. I've > installed Gnuplot-py version 1.8 and I have Gnuplot version 4.2. > > [...] > However, when I attempt to run this program under IDLE, I get no plot > whatsoever and IDLE produces the following report: > > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "copyright", "credits" or "license()" for more information. > > **************************************************************** > Personal firewall software may warn about the connection IDLE > makes to its subprocess using this computer's internal loopback > interface. This connection is not visible on any external > interface and no data is sent to or received from the Internet. > **************************************************************** > > IDLE 1.2 >>>> ================================ RESTART > ================================ >>>> > gnuplot> set terminal aqua > > Traceback (most recent call last): > File "/Users/samueldupree/python programs/example_gnuplot.py", line > 16, in <module> > g.plot(t, y) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Gnuplot/_Gnuplot.py", > line 285, in plot > self.refresh() > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Gnuplot/_Gnuplot.py", > line 226, in refresh > self(self.plotcmd + ' ' + string.join(plotcmds, ', ')) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Gnuplot/_Gnuplot.py", > line 210, in __call__ > self.gnuplot(s) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Gnuplot/gp_macosx.py", > line 144, in __call__ > self.flush() > IOError: [Errno 32] Broken pipe >>>> > > My questions for the list are: > > 1. What am I doing wrong? > 2. What path variables of parameters do I need to set? > 3. Why does my program work when running in a terminal window as > opposed to running under IDLE? It could be that your PATH is not set correctly when running under idle, and so Gnuplot.py cannot find the gnuplot executable. Michael |