<br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 4:53 AM, Wang Jun <span dir="ltr"><<a href="mailto:daxiawj@gmail.com">daxiawj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">
Hello, dear list,<br>
<br>
I have install pygrads successfully on my Ubuntu 11.04 with
opengrads 2.0.a8. <br>
<br>
When I test the pygrads as <br>
"<i>
<a href="http://cookbooks.opengrads.org/index.php?title=Recipe-008:_Using_PyGrADS_to_draw_contours_on_top_of_a_true-color_image_of_the_earth_%28Blue_Marble%29" target="_blank">http://cookbooks.opengrads.org/index.php?title=Recipe-008:_Using_PyGrADS_to_draw_contours_on_top_of_a_true-color_image_of_the_earth_%28Blue_Marble%29</a></i>
"<br>
<br>
It worked !<br>
<br>
While when I start to use python script as following : <b>(ts.py</b>)<br>
<i>import grads<br>
from pylab import title, savefig<br>
ga = GrADS()<br></i></div></blockquote><div><br></div><div>ga = grads.GrADS()</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">
<i>
ga.open('model.ctl')<br>
ga.contour('ts')<br>
title('Surface Temperature')<br>
savefig('ts.png')</i><br>
<br>
<br>
and run it with: <u> python2.6 ts.py</u><br>
<br>
It said:<br>
<i><br>
/usr/local/lib/python2.6/dist-packages/grads/gacore.py:42:
DeprecationWarning: The popen2 module is deprecated. Use the
subprocess module.<br>
from popen2 import popen2<br></i></div></blockquote><div><br></div><div>Ignore this warning.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000"><i>
Traceback (most recent call last):<br>
File "ts.py", line 3, in <module><br>
ga = GrADS()<br>
NameError: name 'GrADS' is not defined</i><br>
<br>
<br></div></blockquote><div><br></div><div>See above.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">
Can anybody tell me what's the problem here and how can I fix it?<br>
<br>
<br></div></blockquote><div><br></div><div> Arlindo</div><div><br></div><div> </div></div><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>