Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-09 Thread Sonja Jankowfsky
So, I deleted the C:\GRASS-4-SVN\Python25 directory and I checked that none of my system environment variables refers to this directory. Additionally I changed the PYTHONHOME to C:\Python26 in the grass64svn.bat file and in the C:\GRASS-4-SVN\etc\init.bat file and I added this variable to my

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-09 Thread Hamish
Sonja wrote: Is there any other place where a wrong PYTHONPATH could be stored??? if you have the grass source code try from the the msys prompt: grep -ri python25 mswindows/* wingrass is a bit of a tangle of startup scripts, especially the osgeo4w build. the above searches through the

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-09 Thread Milton Cezar Ribeiro
Hi There, I am happy running python inside a OSGeo4W grass instalallation. I start MSYS, start grass, and then ryn python 2.5 which are run from C:\OSGeo4W\apps\Python25. But I needed to copy the grass/python library to C:\OSGeo4W\apps\Python25\Lib\site-packages. Good luck, milton 2010/3/9

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-08 Thread Sonja Jankowfsky
I uninstalled Python25 and 24 on my machine and reinstalled Python26 + the packages wxPython, PyWin32, and NumPy. the ftype python.file in the command line changed to Python26 now. However, when I try to run the python script in GRASS I still get the following error: File

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-08 Thread Glynn Clements
Sonja Jankowfsky wrote: I uninstalled Python25 and 24 on my machine and reinstalled Python26 + the packages wxPython, PyWin32, and NumPy. the ftype python.file in the command line changed to Python26 now. However, when I try to run the python script in GRASS I still get the

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-05 Thread Sonja Jankowfsky
So, there is one good thing: I got to run my python program inside GRASS. However, I lost the python GUI. It's good that there is still the Tcl/Tk interface and QGIS ;-) In detail: Reducing the PYTHONPATH to C:\GRASS-4-SVN\etc\python changes nothing in the error message. However, I had a

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-05 Thread Glynn Clements
Sonja Jankowfsky wrote: So, I changed the hole content of my C:\GRASS-4-SVN\Python25 directory with the content of the C:\Python26 directory. I kept the name (Python25) of the directory and the Scripts directory and sip.exe. Now, I can run my Pythonprogramm under the GRASS windows

[GRASS-user] Running Python scripts inside GRASS

2010-03-04 Thread Sonja Jankowfsky
I'm inside a GRASS session, with my Windows GRASS Command Line and I try to run a python script using GRASS functions: import os import grass.script as grass env = grass.gisenv() print env r = grass.read_command(g.list, type='vect') print r GRASS 6.4.0svn (YzeronEPSG)

Re: [GRASS-user] Running Python scripts inside GRASS

2010-03-04 Thread Glynn Clements
Sonja Jankowfsky wrote: I'm inside a GRASS session, with my Windows GRASS Command Line and I try to run a python script using GRASS functions: File E:\pythoninput\test_simple.py, line 2, in module import grass.script as grass File