[GRASS-user] python module under wingrass7

gianluca.massei g_massa at libero.it
Wed Dec 15 12:36:53 EST 2010

Thanks Glynn for help,
now .py extension is registered correctly and my module ends with 
correct code but  The error  message is the same. In linux (ubuntu 10.4 
LTS) all works fine but in windows my module and all other python 
standard   modules (e.g. r.mask) return same error. If I set  
PYTHONPAT=C:\Python27 I have this message " [...] no module named 


Il 15/12/2010 0.28, Glynn Clements ha scritto:
> Ensure that the script has the module and option descriptions at the
> top of the file and the grass.parser() call at the bottom of the file:
> 	if __name__ == "__main__":
> 	    options, flags = grass.parser()
> 	    main()
> with nothing else at the top-level (outside of any function
> defintion).
> If that isn't sufficient, check that that the .py extension is
> registered correctly. You should be able to "execute" a Python script
> from the Windows command prompt by typing its name.
>>     File "C:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py", line
> If the extension is registered to an official version of Python, I
> suggest that you don't change that, but manually edit the startup
> scripts to use the official version rather than the OSGeo4W version.
> You may need to install wxPython, NumPy and/or PyWin32.
> If the extension isn't registered at all, I suggest installing Python
> using the installer from python.org, then following the above
> paragraph.

More information about the grass-user mailing list