[GRASS-user] RE: grass pydev or emacs

Matthew Mulbrandon mulbran at hotmail.com
Thu Apr 1 21:40:46 EDT 2010


Hello,

ran this program from grass_python wiki http://grass.osgeo.org/wiki/GRASS_and_Python
 import os
 import grass.script as grass
 env = grass.gisenv()
 print env
 #List all environment variables
 for key, value in os.environ.items(): print key, value 
 #Print region extent
 r = grass.read_command("g.region", flags='p' )
 print r

on second line I keep getting error

Traceback (most recent call last):
  File "/home/matthew/workspace/dfdsfds/grass.py", line 2, in <module>
    import grass.script as grass
  File "/home/matthew/workspace/dfdsfds/grass.py", line 2, in <module>
    import grass.script as grass
ImportError: No module named script

I checked variables and made make sure grass.script is there. I can not find problem. Any clues would be helpful. 

Ubuntu 9.10, grass 6.4rc5, pydev ,
eclipse  Version: 3.5.2

Thanks,

Matthew

 		 	   		  
Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now. 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100402/3e27588a/attachment.html


More information about the grass-user mailing list