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

Pietro peter.zamb at gmail.com
Tue Mar 4 02:42:07 PST 2014


Hi Glynn,


On Fri, Feb 28, 2014 at 6:00 AM, Glynn Clements
<glynn at 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
-------------- next part --------------
#print(sys.executable)
C:\Program Files (x86)\GRASS GIS 7.0.svn\extrabin\python.exe

#pprint(script.region())
{}

#pprint(os.environ)
{'ALLUSERSPROFILE': 'C:\\ProgramData',
 'APPDATA': 'C:\\Users\\SBiscaini\\AppData\\Roaming',
 'COLORIZE_SYS_STDERR': 'False',
 'COMMONPROGRAMFILES': 'C:\\Program Files (x86)\\Common Files',
 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files',
 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files',
 'COMPUTERNAME': 'ABZN10101EIG',
 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe',
 'ETS_TOOLKIT': 'qt4',
 'FP_NO_HOST_CHECK': 'NO',
 'GISBASE': 'C:\\Program Files (x86)\\GRASS GIS 7.0.svn',
 'GISRC': 'c:\\users\\sbisca~1\\appdata\\local\\temp\\tmptlvsox',
 'GIS_LOCK': '5336',
 'GRASS_SH': 'C:\\Program Files (x86)\\GRASS GIS 7.0.svn\\msys\\bin\\sh.exe',
 'HOMEDRIVE': 'C:',
 'HOMEPATH': '\\Users\\SBiscaini',
 'IGNORE_SIP_SETAPI_ERRORS': 'False',
 'INSTALL_QT_INPUTHOOK': 'True',
 'IPYTHON_KERNEL': 'False',
 'LANG': 'en_GB',
 'LOCALAPPDATA': 'C:\\Users\\SBiscaini\\AppData\\Local',
 'LOGONSERVER': '\\\\ABZN10101EIG',
 'MATPLOTLIB_BACKEND': 'Qt4Agg',
 'MATPLOTLIB_PATCH': 'None',
 'NUMBER_OF_PROCESSORS': '4',
 'OS': 'Windows_NT',
 'PATH': 'C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MATLAB\\R2008b\\bin;C:\\Program Files\\MATLAB\\R2008b\\bin\\win64;C:\\Python27;C:\\Python27\\DLLs;C:\\Python27\\Scripts;C:\\Python27\\Lib\\site-packages\\vtk;C:\\Python27\\gnuplot\\binary;C:\\Program Files (x86)\\pythonxy\\SciTE-3.3.2-3;C:\\Program Files (x86)\\pythonxy\\console;C:\\MinGW32-xy\\bin;C:\\Program Files (x86)\\pythonxy\\swig;C:\\Program Files (x86)\\pythonxy\\gettext\\bin;C:\\Program Files (x86)\\GRASS GIS 7.0.svn\\bin;C:\\Program Files (x86)\\GRASS GIS 7.0.svn\\scripts;C:\\Program Files (x86)\\GRASS GIS 7.0.svn\\extralib;C:\\Program Files (x86)\\GRASS GIS 7.0.svn\\lib',
 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW',
 'PROCESSOR_ARCHITECTURE': 'x86',
 'PROCESSOR_ARCHITEW6432': 'AMD64',
 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 42 Stepping 7, GenuineIntel',
 'PROCESSOR_LEVEL': '6',
 'PROCESSOR_REVISION': '2a07',
 'PROGRAMDATA': 'C:\\ProgramData',
 'PROGRAMFILES': 'C:\\Program Files (x86)',
 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)',
 'PROGRAMW6432': 'C:\\Program Files',
 'PSMODULEPATH': 'C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\',
 'PUBLIC': 'C:\\Users\\Public',
 'PYTHONPATH': 'C:\\Program Files (x86)\\GRASS GIS 7.0.svn\\etc\\python',
 'PYTHONSTARTUP': 'C:\\Python27\\lib\\site-packages\\spyderlib\\scientific_startup.py',
 'PYTHON_INCLUDE': 'C:\\Python27\\include',
 'PYTHON_LIB': 'C:\\Python27\\libs\\python27.lib',
 'QT_API': 'pyqt',
 'SESSIONNAME': 'Console',
 'SPYDER_AR_STATE': 'True',
 'SPYDER_AR_TIMEOUT': '2000',
 'SPYDER_ENCODING': 'cp1252',
 'SPYDER_I_PORT': '20128',
 'SPYDER_N_PORT': '20129',
 'SPYDER_PARENT_DIR': 'C:\\Python27\\lib\\site-packages',
 'SPYDER_SHELL_ID': '112571280',
 'SYSTEMDRIVE': 'C:',
 'SYSTEMROOT': 'C:\\WINDOWS',
 'TCL_LIBRARY': 'C:\\Python27\\tcl\\tcl8.5',
 'TEMP': 'C:\\Users\\SBISCA~1\\AppData\\Local\\Temp',
 'TIX_LIBRARY': 'C:\\Python27\\tcl\\tix8.4.3',
 'TK_LIBRARY': 'C:\\Python27\\tcl\\tk8.5',
 'TMP': 'C:\\Users\\SBISCA~1\\AppData\\Local\\Temp',
 'UATDATA': 'C:\\WINDOWS\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77',
 'USERDOMAIN': 'ABZN10101EIG',
 'USERDOMAIN_ROAMINGPROFILE': 'ABZN10101EIG',
 'USERNAME': 'SBiscaini',
 'USERPROFILE': 'C:\\Users\\SBiscaini',
 'VTK_DATA_ROOT': 'C:\\Python27\\VTKData',
 'WINDIR': 'C:\\WINDOWS'}


More information about the grass-dev mailing list