Glynn, A couple of students are trying to run python in wingrass now, following your directions below. They installed python, but we're not sure where to put #4 in your steps.
>> 4. PYTHONPATH needs to be set to %WINGISBASE%\etc\python It seems like it ought to go into the "grass64svn" initialization file That file has the following lines... PYTHONPATH="$GISBASE/etc/python:$GISBASE/Python25:$PYTHONPATH" export PYTHONPATH PYTHONHOME="C:\Program Files\GRASS-64-SVN\Python25" Does it go there? With quotes? What about changing PYTHONHOME? Is this the wrong place? When we've changed the PYTHONPATH line in grass64svn and tried to run python from the msys prompt in GRASS, nothing happens. That is, the prompt goes away and returns a blank line. You can type on that line, but nothing returns. What are we missing? Thanks 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 Begin forwarded message: >> From: Glynn Clements <[email protected]> >> Date: March 4, 2010 2:48:49 PM MST >> To: Michael Barton <[email protected]> >> Cc: grass-user grass-user <[email protected]>, GRASS developers >> list <[email protected]> >> Subject: Re: [GRASS-user] How to embed a grass script (for example >> v.db.addcol) into a Pythonscript on windows? >> >> >> Michael Barton wrote: >> >>> This implies that it is now possible to create python scripts that run in >>> GRASS under windows??? >>> >>> That would be great news. Is there anything special that is needed for this >>> to work? >> >> 1. The Python interpreter (python.exe) needs to be in the PATH >> 2. Python needs to be associated with the .py extension >> 3. PATHEXT needs to include .py if you want to be able to omit the extension >> 4. PYTHONPATH needs to be set to %WINGISBASE%\etc\python >> >> 1-3 should be taken care of by the Python installer. 4 needs to be >> done by the startup (currently, this doesn't appear to be the case on >> Windows). >> >> -- >> Glynn Clements <[email protected]> >
_______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
