[buug] Teaching myself Python, (&Gnuplot&Unix) not playing correctly

Steve Sands sandssb at gmail.com
Mon Jul 12 14:51:46 PDT 2010


Hello All,
Newbie here.
Using Mac 10.4.11; Intel Core 2; Python 2.6.5; [GCC 4.0.1 (Apple Inc. build
5493)] on darwin

I have downloaded gnuplot, scipy, numpy, and the demo.py file from which one
can glean utility on how to use gnuplot commands from within python.  I
managed to get this working once, and my issue seemed to be related to my
PATH variable.  I.E., the PATH was incorrect, and thus the demo file would
not work.  I did copy the path variable from that session, but once I closed
the terminal, despite resetting the PATH, I can't quite get this demo file
to work again.  I'm pretty sure this is something simple to rectify, but I
can't quite figure it out.  Thus:

steve-computer:/Applications/Python_2.6/site-packages ssands$ cd
gnuplot-py-1.8
steve-computer:/Applications/Python_2.6/site-packages/gnuplot-py-1.8 ssands$
python demo.py
gnuplot> set terminal aqua
gnuplot> set title "A simple example"
gnuplot> set data style linespoints
sh: line 1: gnuplot: command not found
Traceback (most recent call last):
  File "demo.py", line 110, in <module>
    demo()
  File "demo.py", line 33, in demo
    g.plot([[0,1.1], [1,5.8], [2,3.3], [3,4.2]])
  File "/Applications/Python_2.6/site-packages/Gnuplot/_Gnuplot.py", line
285, in plot
    self.refresh()
  File "/Applications/Python_2.6/site-packages/Gnuplot/_Gnuplot.py", line
226, in refresh
    self(self.plotcmd + ' ' + string.join(plotcmds, ', '))
  File "/Applications/Python_2.6/site-packages/Gnuplot/_Gnuplot.py", line
210, in __call__
    self.gnuplot(s)
  File "/Applications/Python_2.6/site-packages/Gnuplot/gp_macosx.py", line
144, in __call__
    self.flush()
IOError: [Errno 32] Broken pipe
^Z
[1]+  Stopped                 python demo.py

Just so folks are aware, I have tried discussing this with the Python
community, they suggested I speak with the Unix community.
Any suggestions/help would be greatly appreciated.  Thanks in advance.

Best regards,

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buug.org/pipermail/buug/attachments/20100712/0ceac6fb/attachment.html>


More information about the buug mailing list