<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello,<br><br>ran this program from grass_python wiki http://grass.osgeo.org/wiki/GRASS_and_Python<br><pre> <span class="ecxkw1">import</span> <span class="ecxkw3">os</span><br> <span class="ecxkw1">import</span> grass.<span class="ecxme1">script</span> as grass<br> env = grass.<span class="ecxme1">gisenv</span><span class="ecxbr0">(</span><span class="ecxbr0">)</span><br> <span class="ecxkw1">print</span> env<br> <span class="ecxco1">#List all environment variables</span><br> <span class="ecxkw1">for</span> key, value <span class="ecxkw1">in</span> <span class="ecxkw3">os</span>.<span class="ecxme1">environ</span>.<span class="ecxme1">items</span><span class="ecxbr0">(</span><span class="ecxbr0">)</span>: <span class="ecxkw1">print</span> key, value <br> <span class="ecxco1">#Print region extent</span><br> r = grass.<span class="ecxme1">read_command</span><span class="ecxbr0">(</span><span class="ecxst0">"g.region"</span>, flags=<span class="ecxst0">'p'</span> <span class="ecxbr0">)</span><br> <span class="ecxkw1">print</span> r<br><br>on second line I keep getting error<br><br>Traceback (most recent call last):<br> File "/home/matthew/workspace/dfdsfds/grass.py", line 2, in <module><br> import grass.script as grass<br> File "/home/matthew/workspace/dfdsfds/grass.py", line 2, in <module><br> import grass.script as grass<br>ImportError: No module named script<br><br>I checked variables and made make sure grass.script is there. I can not find problem. Any clues would be helpful. <br></pre><br>Ubuntu 9.10, grass 6.4rc5, pydev ,
eclipse Version: 3.5.2<br><br>Thanks,<br><br>Matthew<br><hr id="stopSpelling"><br>                                            <br><hr>Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href="http://clk.atdmt.com/GBL/go/210850552/direct/01/">Sign up now.</a>                                            <br /><hr />Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1' target='_new'>Learn More.</a></body>
</html>