[GRASS-user] Python scripting and GRASS

Sonja Jankowfsky sonja.jankowfsky at cemagref.fr
Thu Jan 14 05:06:31 EST 2010


Greetings,


I have some questions concerning Python scripting for GRASS under 
windows. I'm relatively new to GRASS, and I'm neither familiar with 
Python nor UNIX (but I have some programming experience, C++, Java). I 
have six months, in which I have to work on the preprocessing of a 
hydrologic model with GRASS. For that it will be necessary to write some 
scripts. The idea was to use Python for this, as it is platform 
independent and more powerfull than UNIX (I'm working on windows as the 
model only runs on windows) . However, I have some problems getting 
started and all what I found on the internet was quite confusing. I 
would appreciate all advice concerning the following questions:


Which compiler is usually used for Python scripting with GRASS? Is there 
a standard way?

Is it possible to do the scripting inside GRASS?

Can I use SWIG? Do I have to install it extra, or is there an integrated 
version?

I found a description how to configure Eclipse for python and GRASS, but 
up to now I get some Attribut errors while compiling the simple test 
code (I think there are still some problems with the environment 
variables).

Can I run python scripts with MySYS?

Can I access to all the GRASS functions with Python?

Is it usefull to use IDLE?

Is the GRASS plugin for QGIS written in Python?

Or is it just easier to write the scripts in UNIX? Is it possible to 
execute the UNIX scripts with MySYS under windows?


I'm looking for the easiest way, as there is lots of work to do. I would 
be really happy about some advice!

Many thanks in advance,

Sonja




I'm looking for the easiest way as there is a lot of work to do. So, if 
it is too complicated, I might as well script with

Is it possible to run python scripts inside GRASS (with MySYS?). What's 
best to use as developper environment? What I found up to now, was a 
description how to configure Eclipse for GRASS and Python, 

-- 
Sonja Jankowfsky
UR Hydrologie-Hydraulique
Cemagref de Lyon
3 bis quai Chauveau CP 220
69336 Lyon Cedex 09
FRANCE
Tel : (+33)4 72 20 86 11 	 
Fax : (+33)4 78 47 78 75 



More information about the grass-user mailing list