[GRASS-dev] First step by GRASS

I want to create a simple plugin that uses grass.
My configuration is:

  • OS: widows 7 64bit
  • Python: 2.7.4 (32bit)
  • Osgeo4W (32bit) with

-Qgis: 2.12.0
-Grass: 6.4.4
-Python: 2.7.4

GISBASE=C:/OSGeo4W/apps/grass/grass-6.4.4
GISRC=C:/Users/intema/AppData/Roaming/GRASS6/.grassrc6
PYTHONPATH=%GISBASE%/etc/python;%GISBASE%/etc/python/grass;%GISBASE%/etc/python/grass/script
PATH=%GISBASE%/lib;%GISBASE%/bin;%GISBASE%/scripts;C:/OSGeo4W/bin

if I open a shell and start python and write the command import grass.script everything works.
if I open qgis and open the shell of python and write the command import grass.script I have the following error
File “C:\OSGeo4W\apps\Python27\lib\subprocess.py”, line 878, in _make_inheritable
_subprocess.DUPLICATE_SAME_ACCESS)
WindowsError: [Error 6] Handle non valido

if I write in my plugin the command import grass.script I have the seame error.

I followed the tutorial:
https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly

Please help I read all forum that reported the same mistake but I did not find solution .
Some indicate that the problem definition dell’stdin stdout and stderr .

I’m sorry for my english.

On Fri, Nov 6, 2015 at 2:52 PM, Nunzia Laguardia
<laguardia.nunzia@gmail.com> wrote:

I want to create a simple plugin that uses grass.
My configuration is:
- OS: widows 7 64bit
- Python: 2.7.4 (32bit)
- Osgeo4W (32bit) with

   -Qgis: 2.12.0
   -Grass: 6.4.4
   -Python: 2.7.4

... since you just start to write, please consider to upgrade to GRASS
7.0 (you can keep GRASS 6 in parallel if needed).

Then see the page
https://grasswiki.osgeo.org/wiki/GRASS_and_Python

Best
Markus