[GRASS-user] Running an external executable file from a Python Script

António Rocha antonio.rocha at deimos.com.pt
Thu Mar 10 08:57:21 EST 2011


Greetings all,

I have a python script from where I need to run an external binary (in 
Windows). This external binary (not developed by me) uses an 
input_parameter file to configure binary and get other parameters. The 
problem is that this binary requires that in my active folder I have my 
parameter file. Example: If I want to run this binary (outside GRASS 
Python Scripts) i open cmd, go to a folder where I have a parameter file 
(e.g. c:\delete (cd c:\delete)) Then  I can run this binary as long as I 
have my parameter file in my "active folder" like this 
(c:\tool\training.exe). What I mean is that in my active folder I do not 
need to have my binary only my parameter file.
My question is, when I'm running a GRASS python Script what is my active 
folder in order to place there my Parameter file? Or, is there any way 
to change my "active folder" while I'm running GRASS python Script?

Hope I was clear enough in this email since this was unexpected for me.

Thanks
Antonio


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5941 (20110310) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




More information about the grass-user mailing list