[GRASS-user] How to embed a grass script (for example v.db.addcol) into a Pythonscript on windows?

Sonja Jankowfsky sonja.jankowfsky at cemagref.fr
Thu Mar 4 04:44:12 EST 2010


I made some further tests:

in C:\Windows\system32\cmd.exe
C:\GRASS-4-SVN\bin\v.in.ogr.exe
result: L'ordinal 284 est introuvable dans la bibliothèque de liaisons 
dynamique SSLEAY32.dll.
(call to v.in.ogr works fine in a pythonscript run in Eclipse, but not 
run in the windows command line)

C:\GRASS-4-SVN\bin\v.db.addcol.bat
result: '""' n'est pas reconnu en tant que commande interne ou externe, 
un programme ex‚cutable ou un fichier de commandes.

in GRASS Command Line
GRASS 6.4.0svn (YzeronEPSG)> C:\GRASS-4-SVN\bin\v.in.ogr.exe opens the GUI
same for .... v.db.addcol.bat

I have no idea where the error with the SSLEAY32.dll comes from, but my 
conclusion for the v.db.addcol is, that:
inside GRASS there is something installed to execute the bat files with 
shell scripts. Do I have to add this "something" to my environment 
variables of my windows machine in order to be able to run the bat files 
with my windows command line? What's this "something", Msys?
Do I have to be inside GRASS to run the pythonscripts?
Thanks for any ideas,
Sonja





Glynn Clements a écrit :
> Sonja Jankowfsky wrote:
>
>   
>> Thanks, but the data type doesn't change that's a shell script. I still 
>> have the same error message: (sorry, it's in french, but it says as much 
>> as v.db.addcol is not a executable program or a bat file).
>>
>> I tried as well os.system("v.db.addcol map=ditch columns='urban int'"), 
>> but it's the same.
>>     
>
> This can occur if PATH is incorrect. GRASS' "bin" directory should be
> in the path, the "scripts" directory shouldn't be. There should be a
> batch file named v.db.addcol.bat in the "bin" directory.
>
>   


-- 
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