<div>Dear all,</div>
<div> </div>
<div>Almost on my system, running (windows, sorry), I can run only version 2.5 of python with grass.</div>
<div>Version 2.6 give a conflit because "wish" is a reserved word on 2.6 versioni.</div>
<div>How we can deal with it?</div>
<div> </div>
<div>Cheers</div>
<div> </div>
<div>milton<br><br></div>
<div class="gmail_quote">2009/5/4 Milton Cezar Ribeiro <span dir="ltr"><<a href="mailto:miltinho.astronauta@gmail.com">miltinho.astronauta@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi Rgurus,</div>
<div> </div>
<div>I am trying to play with grass and python under Msys (windows).</div>
<div>I wrote a silly code, only to test if python can be run fom grass.</div>
<div> </div>
<div>GRASS 6.4.0RC4 (newLocation):~ > cat aaa.py<br>a =1<br>b = "The world is real"<br>print a,b</div>
<div> </div>
<div>GRASS 6.4.0RC4 (newLocation):~ > python aaa.py<br>1 The world is real<br>c:\Python26\lib\site.py:150: Warning: 'with' will become a reserved keyword in Python 2.6<br>'import site' failed; use -v for traceback<br>
</div>
<div>#----</div>
<div>As you can see, I can run the python code from grass, but I receive a warning message.</div>
<div>But when I try to import grass, I get an error message:</div>
<div> </div>
<div>GRASS 6.4.0RC4 (newLocation):~ > cat grass_python_test.py <br>import sys<br>import grass</div>
<div> </div>
<div>GRASS 6.4.0RC4 (newLocation):~ > python grass_python_test.py <br>c:\Python26\lib\site.py:150: Warning: 'with' will become a reserved keyword in Python 2.6<br>'import site' failed; use -v for traceback<br>
Traceback (most recent call last):<br> File "grass_python_test.py", line 2, in <module><br> import grass<br> File "C:\OSGeo4W\apps\grass\grass-6.4.0RC4\etc\python\grass.py", line 1, in <module><br>
import os<br> File "c:\Python26\lib\os.py", line 757<br> bs = b""<br> ^<br>SyntaxError: invalid syntax<br></div>
<div> </div>
<div>Any help are welcome.</div>
<div> </div><font color="#888888">
<div>milton</div></font></blockquote></div><br>