[GRASS-dev] Working with GRASS without starting it explicitly on windows

Dear All,

I'm trying to start grass grass without starting it explicitly on
windows, but it is not working, I've attached the script that works on
linux... in windows the result of the script is:

C:\Program Files (x86)\GRASS GIS 7.0.svn\extrabin\python.exe
{}

the first line is the path to the python interpreter in use and the
dictionary is the result of the script.core.region function.

Why is not working?
How can I fix this?

Pietro

(attachments)

startup_grass.py (1.28 KB)

Pietro wrote:

I'm trying to start grass grass without starting it explicitly on
windows, but it is not working, I've attached the script that works on
linux... in windows the result of the script is:

C:\Program Files (x86)\GRASS GIS 7.0.svn\extrabin\python.exe
{}

the first line is the path to the python interpreter in use and the
dictionary is the result of the script.core.region function.

Can you add pprint(os.environ) to the end of the script and provide
the result?

Also, has the mapset already been created, i.e. does the file

  C:\Users\Pietro\Desktop\GRASS_FILE\ncb7\user1\WIND

exist?

--
Glynn Clements <glynn@gclements.plus.com>

Hi Glynn,

On Fri, Feb 28, 2014 at 6:00 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Can you add pprint(os.environ) to the end of the script and provide
the result?

yes, I' attached the results, I'm running the script not on my computer...

Also, has the mapset already been created, i.e. does the file

        C:\Users\Pietro\Desktop\GRASS_FILE\ncb7\user1\WIND

exist?

yes, it exists, and I can use GRASS inside this mapset without problems.

Pietro

(attachments)

stdout_python.txt (3.55 KB)

Pietro wrote:

yes, I' attached the results

I see nothing fundamentally wrong there.

In theory, this could be a problem:

'PYTHONSTARTUP':
'C:\\Python27\\lib\\site-packages\\spyderlib\\scientific_startup.py',

Also, some of the directories which are ahead of GRASS in the PATH
setting could create issues. Try setting PATH so that it only includes
the base Windows directories plus the GRASS directories.

--
Glynn Clements <glynn@gclements.plus.com>