[GRASS-user] Grass 6.4 & python.

Milton Cezar Ribeiro miltinho.astronauta at gmail.com
Tue Apr 28 13:06:16 EDT 2009


Thanks Jhon,

I started grass under Msys and with the flag -wx.
My difficult now I how can I get starting, with a simple example, like
these on the grass-python page:

import sys
import grass
def main():
    drape_map = options['drapemap']
    relief_map = options['reliefmap']
    brighten = options['brighten']
    ret = grass.run_command("d.his", h_map = drapemap,  i_map = relief_map,
brighten = brighten)
    sys.exit(ret)
if __name__ == "__main__":
    options, flags = grass.parser()
    main()

My question is how can I make python find the "grass" to run the import.
I need to start python inside a MSYS -> GRASS session, like R do?

Regards

milton

2009/4/28 Jhon Ortiz <eljhonjhon at hotmail.com>

>
>
> >I know that the grass 7 will works with python.
> >But can I play with grass 6.4 (under Msys) and python?
>
> Yes!!
>
> you can see about that in
> http://grass.osgeo.org/grass64/manuals/html64_user/wxGUI.html
>
> >Case yes, could you send me some tips how
>
> >can I do this?
>
> just type in your terminal grass64 -wxpython
>
> >By the way, running under Windows Vista and/or
>  >Linux Ubuntu.
>
> Thanks a lot
>
> milton ribeiro
> brazil-toronto
>
>  ------------------------------
> Ahora lee tus emails de Hotmail desde tu móvil Vodafone ¡Aquí!
> <http://serviciosmoviles.es.msn.com/hotmail/vodafone.aspx>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090428/15b4c9a1/attachment.html


More information about the grass-user mailing list