|
From: Pete O'C. <ped...@gm...> - 2012-05-30 07:16:19
|
Hi Sarat. Thanks. That doesn't error anymore. I am just getting started
with this and I found this code on the web which I am trying to run:
from numpy import *
import Gnuplot
x = linspace(0,10,31)
y = x**2
y2 = 10*sin(pi*x)
g = Gnuplot.Gnuplot() #!! Won't be able to use 'with' in python 2.6?
d = Gnuplot.Data(x,y,title='squared', with_='lp lt 1 pt 6')
d2=Gnuplot.Data(x,y2,title='sine',with_='p pt 7 ps 4')
g('set grid')
When I test the line:
g('set grid')
I get the following error
File "<string>", line 1, in <module>
File "/vol/here/linux64/lib/python2.6/site-packages/Gnuplot/_Gnuplot.py",
line 210, in __call__
self.gnuplot(s)
File "/vol/here/linux64/lib/python2.6/site-packages/Gnuplot/gp_unix.py",
line 210, in __call__
self.flush()
IOError: [Errno 32] Broken pipe
Anyone know what that means?
Thanks for your help
Pete
On Wed, May 30, 2012 at 5:49 PM, Sarat Sreepathi <sa...@tr...> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Pete,
>
> I had the same problem. Use 'with_' instead of 'with' (h/t Edo).
>
> - -Sarat.
>
> On 05/30/2012 12:59 AM, Pete O'Connell wrote:
> > Hi I am using python 2.6 and would like to use the gnuplot.py
> > package. I can't get my code to run because it says that the with
> > statement in Gnuplot.data won't run in Python 2.6
> >
> > Is there a workaround for this? I tried importing the with
> > statement from the future but no dice. Also, I can only use python
> > 2.6 in this case.
> >
> > Any help would be greatly appreciated.
> >
> > Pete
> >
> > -- -
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> >
> Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond.
> > Discussions will include endpoint security, mobile security and the
> > latest in malware threats.
> > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >
> >
> >
> > _______________________________________________ Gnuplot-py-users
> > mailing list Gnu...@li...
> > https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJPxbUEAAoJEGRt4wHV94AVWAAP/3lZoN9Fjqjtro4DxUEIHrkG
> XrwGhwuBPthhxv0eouNthMrLVw02aD6/sQ1kdWWMrdLR2xTFPxkk0un+P9a2JKpT
> tdQLi7vvo/1OBv/UckMcD9Vr28euglRl1oyTragSTsDO3urB2/4LlFfkRi9icn3k
> L88zJJFxEVUlLh2i73XLBGdWdtSo5qoo+7K2Zg8dgOyCkdIcG41qYdGynUz8CGQP
> FT3zIOOjdq8kPL88i5Wv71PpNNCg2jF26bIMkfzLfrEX4CS5hAdQyeIksptUgpK/
> 6gSUpzNHDljh3+kXMsMNKx6pnHhb1OTf0TvoQ276eyCDB0XxE4Sveh7VcpKYL0sN
> Yul4DzKRtZJHgOYh/GHkW8SZ9hUOKPNjK+/dOzNMA27tw/o0CKLCrIqi8AG9ki8C
> 3nTuGGRo1DNypw0aemu6sF9lBHFVLga7NZb942jy2FJkDOXiu4St6upZHvoY82cg
> QhN/jLbumpoUlYyGTGiSscsE/FSUzAswIU/YYanqJ0/qvCX7IHIVjbK3QeL93unW
> 8cqZpSX6BWnLSJEl6mX7/cbRTnSKGqO5GFKFtS321ZnIpaSnAkdaU3xCbDnlyLr8
> OFwqNhMIWQ8YkVMLAqFedSC6fEjTtHqWEDx7B4R/B/hX4bTRCGcNcUQ1w+zyWqrE
> CjxweXZpliLM4GzTr/7k
> =xMwP
> -----END PGP SIGNATURE-----
>
--
-
--
-
|