sorry for the a html-mail -----Ursprüngliche Nachricht----- Von: Helmut Kudrnovsky <[email protected]> Gesendet: 10.04.2010 00:43:47 An: Isaac Ullah <[email protected]> Betreff: How to embed a grass script (for example v.db.addcol) into a Pythonscript on windows?
Hi Isaac, sorry for my delayed answered, very busy in my normal job outside any gis. what I've done (using the nightly builds of WinGrass7, http://josef.fsv.cvut.cz/wingrass/grass70/): I've copied from http://grass.osgeo.org/wiki/GRASS_and_Python all lines of code for the Display example in a text-file and saved this in C:\Program Files\GRASS-70-SVN\scripts under for example test_h.py, and this lines of code are working (python bundled by WinGrass7). please open a ticket - if necessary - in trac (http://trac.osgeo.org/grass/) to keep all important steps available for the community. best regards Helmut --------------------- Von: Isaac Ullah Gesendet: 06.04.2010 20:51:25 An: Michael Barton <[email protected]> Betreff: Re: [GRASS-dev] Fwd: [GRASS-user] How to embed a grass script (for example v.db.addcol) into a Pythonscript on windows? Hi all, See the attached screen capture for the error I get when I try to run grass python scripts. This happens regardless of which version of python I use (ie. bundled python2.5, or using Glynn's .bat to start Grass with my version of python2.6), and occurs whether or not I add command line args to the script call. AFAICT when importing the "subprocess" methods, python seems to think it needs to also import some commands from "collections", which it fails to find. Any ideas about this? Cheers, Isaac On Sat, Apr 3, 2010 at 1:20 PM, Michael Barton <[[email protected]]> wrote: Thanks. I'm sending this along to students. I didn't realize that there is a nightly build of GRASS 7 too. Michael ____________________ C. Michael Barton Director, Center for Social Dynamics & Complexity Professor of Anthropology, School of Human Evolution & Social Change Arizona State University voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC) fax: 480-965-7671 SHESC), 480-727-0709 (CSDC) www: [www.public.asu.edu/~cmbarton], [http://csdc.asu.edu] On Apr 3, 2010, at 12:07 PM, Helmut Kudrnovsky wrote: >>> --------------------- >>> Von: Michael Barton <[[email protected]]> >>> In a related question, maybe more for Colin, does GRASS 7 work in >>> Windows? If so, what is the setup to allow it to run the scripts in >>> Python? >> >> >> GRASS 7 works in Windows using a similar batch file to that which I >> posted for 6.x. However, the Init.bat file needs some work. Starting >> with -wxpython doesn't work (you can start it manually via g.gui, >> though). If you start in -text mode, you'll get a couple of errors >> about the missing set_data program, but you'll end up in a session >> using the existing .grassrc7 file (provided that one exists). > > for testing there is a nightly build of WinGrass7: > > [http://grass.osgeo.org/download/software.php] > [http://josef.fsv.cvut.cz/wingrass/grass70/] > > best regards > Helmut > ___________________________________________________________ > NEU: [WEB.DE] DSL für 19,99 EUR/mtl. und ohne Mindest-Laufzeit! > [http://produkte.web.de/go/02/] -- Isaac I Ullah, M.A. Archaeology PhD Candidate, ASU School of Evolution and Social Change Research Assistant, Mediterranean Landscape Dynamics Project *************************************************** [[email protected]] [[email protected]] [http://www.public.asu.edu/~iullah] *************************************************** ___________________________________________________________ NEU: WEB.DE DSL für 19,99 EUR/mtl. und ohne Mindest-Laufzeit! http://produkte.web.de/go/02/
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
