Send grass-windows mailing list submissions to grass-windows@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/grass-windows or, via email, send a message with subject or body 'help' to grass-windows-requ...@lists.osgeo.org You can reach the person managing the list at grass-windows-ow...@lists.osgeo.org When replying, please edit your Subject line so it is more specific than "Re: Contents of grass-windows digest..." Today's Topics: 1. Problem executing a python script with Grass functions from windows command line (sonja1) 2. Re: GUI with python scripts or shell scripts (Sonja Jankowfsky) 3. Re: GUI with python scripts or shell scripts (Sonja Jankowfsky) ---------------------------------------------------------------------- Message: 1 Date: Wed, 3 Mar 2010 02:37:15 -0800 (PST) From: sonja1 <sonja.jankowf...@cemagref.fr> Subject: [GRASS-windows] Problem executing a python script with Grass functions from windows command line To: grass-windows@lists.osgeo.org Message-ID: <1267612635813-4666698.p...@n2.nabble.com> Content-Type: text/plain; charset=UTF-8 Hi, I try to run the following pythonscript under a windows command line: import os import grass.script as grass env = grass.gisenv() print env r = grass.read_command("g.list", type='vect') print r #Define raster resolution grass.run_command("g.remove", 'MASK') grass.run_command("g.region", res='1') I have set the following environmentvariables GISBASE= C:\GRASS-64 GISRC= C:\Documents and Settings\user\.grassrc6 LD_LIBRARY_PATH= C:\GRASS-64\lib PATH= C:\GRASS-64\etc;C:\GRASS-64\etc\python;C:\GRASS-64\lib;C:\GRASS-64\bin;C:\GRASS-64\extralib;C:\GRASS-64\scripts;C:\Python26; PYTHONLIB= C:\Python26 PYTHONPATH= C:\GRASS-64\etc;C:\GRASS-64\etc\python;C:\GRASS-64\lib;C:\GRASS-64\bin;C:\GRASS-64\extralib;C:\GRASS-64\scripts;C:\Python26; The script runs ok until the command "g.remove", then I get the following error g.remove.exe Ordinal introuvable L'ordinal 284 est introuvable dans la bibliothèque de liaisons dynamique SSLEAY32.dll. I reinstalled the latest WinGRASS version. When I run the same script in a configured Eclipse environment, it runs well. Does anyone have an idea? Thanks, Sonja -- View this message in context: http://n2.nabble.com/Problem-executing-a-python-script-with-Grass-functions-from-windows-command-line-tp4666698p4666698.html Sent from the Grass - Win mailing list archive at Nabble.com. ------------------------------ Message: 2 Date: Wed, 03 Mar 2010 13:10:09 +0100 From: Sonja Jankowfsky <sonja.jankowf...@cemagref.fr> Subject: Re: [GRASS-windows] GUI with python scripts or shell scripts To: grass-windows@lists.osgeo.org Message-ID: <4b8e51a1.4030...@cemagref.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I did some more tests on my machine on this subject and what I get is this: I don't get an interface with the grass parser on my windows machine, neither with a shell script running through Msys, nor a python script running through the windows commandline. However, I can enter the variables as normal GRASS command on my command line: test.py input=ditch.shp output=ditch1 test.sh input=ditch.shp output=ditch1 Is this a common bug? Sonja On 1/29/2010 7:25 PM, Glynn Clements wrote: > What do you get from: > > junk.py --interface-description > ? > Here is the output GRASS 6.4> F:\\AMNH\\WHRC_CarbonProject\\R_Project\\PercentCoverTutorial\\junk. py --interface-description GRASS 6.4> <?xml version="1.0" encoding="CP1252"?> <!DOCTYPE task SYSTEM "grass-interface.dtd"> <task name="junk.py"> <description> g.parser test script (python) </description> <parameter name="raster" type="string" required="yes" multiple="no"> <description> Raster input map </description> <gisprompt age="old" element="cell" prompt="raster" /> </parameter> <parameter name="vector" type="string" required="yes" multiple="no"> <description> Vector input map </description> <gisprompt age="old" element="vector" prompt="vector" /> </parameter> <parameter name="option1" type="string" required="no" multiple="no"> <description> An option </description> </parameter> <flag name="f"> <description> A flag </description> </flag> <flag name="verbose"> <description> Verbose module output </description> </flag> <flag name="quiet"> <description> Quiet module output </description> </flag> </task> ------------------------------ Message: 3 Date: Wed, 03 Mar 2010 13:39:46 +0100 From: Sonja Jankowfsky <sonja.jankowf...@cemagref.fr> Subject: Re: [GRASS-windows] GUI with python scripts or shell scripts To: grass-windows@lists.osgeo.org Message-ID: <4b8e5892.40...@cemagref.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Two more details. If I try to run the program just with the name >test.py I get the following error message: ERROR: wxGUI requires wxPython. No module named wxversion. However, if I run gisenv in the same python script 'GRASS_GUI' is wxpython If I enter the variables test.py input=.... output=..... it runs the program, but I get the following message: 'sh' is not known as commande intern But that's a python script! So I think, there is still something wrong with the covnersion to windows. Does anybody know more? Sonja Sonja Jankowfsky a écrit : > I did some more tests on my machine on this subject and what I get is > this: > I don't get an interface with the grass parser on my windows machine, > neither with a shell script running through Msys, nor a python script > running through the windows commandline. However, I can enter the > variables as normal GRASS command on my command line: > > test.py input=ditch.shp output=ditch1 > > test.sh input=ditch.shp output=ditch1 > > Is this a common bug? > Sonja > > On 1/29/2010 7:25 PM, Glynn Clements wrote: > >> What do you get from: > >> > >> junk.py --interface-description > >> ? > >> > > Here is the output > > > GRASS 6.4> > F:\\AMNH\\WHRC_CarbonProject\\R_Project\\PercentCoverTutorial\\junk. > > py --interface-description > > GRASS 6.4> <?xml version="1.0" encoding="CP1252"?> > > <!DOCTYPE task SYSTEM "grass-interface.dtd"> > > <task name="junk.py"> > > <description> > > g.parser test script (python) > > </description> > > <parameter name="raster" type="string" required="yes" multiple="no"> > > <description> > > Raster input map > > </description> > > <gisprompt age="old" element="cell" prompt="raster" /> > > </parameter> > > <parameter name="vector" type="string" required="yes" multiple="no"> > > <description> > > Vector input map > > </description> > > <gisprompt age="old" element="vector" prompt="vector" /> > > </parameter> > > <parameter name="option1" type="string" required="no" multiple="no"> > > <description> > > An option > > </description> > > </parameter> > > <flag name="f"> > > <description> > > A flag > > </description> > > </flag> > > <flag name="verbose"> > > <description> > > Verbose module output > > </description> > > </flag> > > <flag name="quiet"> > > <description> > > Quiet module output > > </description> > > </flag> > > </task> > > ------------------------------ _______________________________________________ grass-windows mailing list grass-windows@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-windows End of grass-windows Digest, Vol 43, Issue 2 ********************************************