[gradsusr] PyGrADS OK, but python script is not working!
Wang Jun
daxiawj at gmail.com
Tue Mar 29 04:53:36 EDT 2011
Hello, dear list,
I have install pygrads successfully on my Ubuntu 11.04 with
opengrads 2.0.a8.
When I test the pygrads as
"/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/
"
It worked !
While when I start to use python script as following : *(ts.py*)
/import grads
from pylab import title, savefig
ga = GrADS()
ga.open('model.ctl')
ga.contour('ts')
title('Surface Temperature')
savefig('ts.png')/
and run it with: _python2.6 ts.py_
It said:
/
/usr/local/lib/python2.6/dist-packages/grads/gacore.py:42:
DeprecationWarning: The popen2 module is deprecated. Use the subprocess
module.
from popen2 import popen2
Traceback (most recent call last):
File "ts.py", line 3, in <module>
ga = GrADS()
NameError: name 'GrADS' is not defined/
Can anybody tell me what's the problem here and how can I fix it?
Thanks!
Wang Jun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110329/3c14d3df/attachment-0003.html
More information about the gradsusr
mailing list