[SPAM] New PyGrADS 1.0.8, works on Windows

黄平 ph0007 at USTC.EDU
Tue Apr 8 09:01:56 EDT 2008


Hi,Arlindo

I installed "pygrads-1.0.8.win32_superpack.exe"

After one afternoon's fumble, I have some preliminary understanding about PyGrads and achieve some simple task.

There is a little  question: how to send the Python variables to GrADS when I want set the attributes.

For example:
in GrADS Scripting Language
x1=1
x2=5
y1=1
y2=3
'set parea 'x1' 'x2' 'y1' 'y2

How to achieve this function in PyGrads simply?

Thanks

Peter Huang

2008/4/8 <ph0007 at ustc.edu>:

Hi,Arlindo da Silva, 

I am a grads user. As your introduction, I am very interested in PyGrADS. But I have never known about Python.
Today I have a try. The installation is easy. There are some question about the PyGrADS.



Which package exactly did you install?

1. PATH:
The install package didn't add the Python PATH to the OS search PATH automatically.
I added "C:\Python25;C:\Python25\Lib\site-packages;C:\Python25\Scripts" to the end of system's PATH. I don't know whether it is enough.



You need check a box during setup for having your PATH modified automatically. The only thing you need is C:\Python25. Remeber, Windows cannot start Python scripts directly.



2. "From your OS the command line enter: % pygrads -h"
The windows command line can just run executable file such as .exe and .com. But I cannot find the executable file about pygrads . The only way is double-click the file "pygrads.py" in "C:\Python25\Scripts", which is the same as clicking the shortcut in windows start manu.


That is right, if you would like to run Python from the command line you would need to run a Unix shell such as bash pr csh. Or else, you will need to prepare bat files for starting your python scripts.





3. How to use other IDEs such as IDLE and Pythonwin with PyGrads?


There is PyGrADS and pygrads. If you write scripts that use the modules provided by PyGrADS, start IDLE and then open yourscript.py that uses the PyGrADS modules. Now, 'pygrads' is a frontend to ipython, a command line environment of its own, you do not run it under it Pythonwin shell; pygrads is actually a cover for IPython.


4. What's the relationship among Python, IPython, PyGrads and Grads?



This is explained in the Wiki:


   http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS#Microsoft_Windows




5. Could you advise a well-suited custom when using PyGrads? 



Read the wiki and follow the links, specially the Win32 specific ones. Get some basic familiarity with Pyhton, and Python under Win32 first. It will help.


    Arlindo





-- 
Arlindo da Silva
dasilva at alum.mit.edu 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080408/8a568cb6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1237 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080408/8a568cb6/attachment.gif 


More information about the gradsusr mailing list