[GRASS-user] grass-python editing using Wing-IDE

Vaclav Petras wenzeslaus at gmail.com
Sat Jan 18 17:16:32 PST 2014


On Sat, Jan 18, 2014 at 6:47 PM, Milton Ribeiro <
miltinho.astronauta at gmail.com> wrote:

> Hi there
>
> Just to keep the info, I found it, and now everything is working fine with
> autocomplete under Wingware.
>
> I copied the folder "C:\Program Files (x86)\GRASS GIS
> 6.4.3RC2\etc\python\grass" to
> "C:\Python27\Lib\site-packages"
>
> Thanks for info. Just keep in mind that what you did is not a clean way,
although it will probably work for completion and docstrings. However,
remember that still you should run scripts from the GRASS session (GUI or
command line) and not directly from the editor.

Anyway, setting PYTHONPATH to C:\Program Files (x86)\GRASS GIS
6.4.3RC2\etc\python\grass for your editor should work and it strange if it
do not. But this can be editor/IDE dependent.

Thanks again
>
> milton
>
>
> 2014/1/18 Milton Ribeiro <miltinho.astronauta at gmail.com>
>
>> Dear Anna and Vaclav,
>>
>> thanks a lot for your kind reply.
>>
>> I tried to find grass.script to define de proper address where it is, or
>> to copy this to my python/lib directory but I could'nt find.
>> I am using window 8.
>> Any hint are welcome.
>>
>> best
>>
>> milton
>>
>>
>>
>> 2014/1/17 Vaclav Petras <wenzeslaus at gmail.com>
>>
>>>
>>>
>>>
>>> On Fri, Jan 17, 2014 at 2:23 PM, Milton Ribeiro <
>>> miltinho.astronauta at gmail.com> wrote:
>>>
>>>> Dear all,
>>>>
>>>> I would like to know if is there anyone using
>>>> WingIDE python editor to write python grass scripting.
>>>>
>>>> I am using WingIDE under windows, but grass.scripting lib methods not
>>>> autocomplete, and the help of grass.scripting not appears on WingIDE as for
>>>> other libs of python.
>>>>
>>>> I'm not using WingIDE nor Windows, so I hope somebody else will reply,
>>> too.
>>>
>>> However, (for several reasons) grass.script is not installed to the
>>> system (to the python installation), so you need to tell your IDE where to
>>> look for the grass.scripting. One possibility is to set PYTHONPATH
>>> environmental variable (which will then appear in sys.path in python) for
>>> the IDE:
>>>
>>> http://www.wingware.com/doc/intro/tutorial-python-path
>>>
>>> Maybe there is some settings even directly in the editor. The path
>>> should be set to the directory where grass.script, i.e. something like:
>>>
>>> C:\path\to\grass\etc\python\
>>>
>>> The way which works the best for me, on Ubuntu with Spyder Python IDE,
>>> is starting the editor from within the GRASS session (GRASS command line).
>>> This ensures that the environment is set right and you not only have the
>>> autocomplete and documentation but also that you can run your python GRASS
>>> scripts in the IDE. In theory, this should work the same on MS Windows.
>>>
>>> Vaclav
>>>
>>>
>>>  best wishes
>>>
>>>>
>>>> --
>>>> Miltinho - mcr at rc.unesp.br
>>>> Laboratório de Ecologia Espacial e Conservação - LEEC
>>>> Depto de Ecologia - UNESP - Rio Claro
>>>> Av. 24A, 1515- Bela Vista
>>>> 13506-900 Rio Claro, SP, Brasil
>>>>
>>>> Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
>>>> Cel: 19 9853-3220 / 19 9853-5430
>>>>
>>>> Depto Ecologia http://ib.rc.unesp.br/#!/departamentos/ecologia/
>>>> PG ECO & BIODIV
>>>> http://ib.rc.unesp.br/#!/departamentos/ecologia/pos-graduacao-em-ecologia-e-biodiversidade/
>>>>
>>>> CV
>>>> http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6&mostrarNroCitacoesISI=true&mostrarNroCitacoesScopus=true
>>>>
>>>> Google citations http://scholar.google.com/citations?user=OWX_2eAAAAAJ
>>>>
>>>> _______________________________________________
>>>> grass-user mailing list
>>>> grass-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>
>>>
>>
>>
>> --
>> Miltinho - mcr at rc.unesp.br
>> Laboratório de Ecologia Espacial e Conservação - LEEC
>> Depto de Ecologia - UNESP - Rio Claro
>> Av. 24A, 1515- Bela Vista
>> 13506-900 Rio Claro, SP, Brasil
>>
>> Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
>> Cel: 19 9853-3220 / 19 9853-5430
>>
>> Depto Ecologia http://ib.rc.unesp.br/#!/departamentos/ecologia/
>> PG ECO & BIODIV
>> http://ib.rc.unesp.br/#!/departamentos/ecologia/pos-graduacao-em-ecologia-e-biodiversidade/
>>
>> CV
>> http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6&mostrarNroCitacoesISI=true&mostrarNroCitacoesScopus=true
>>
>> Google citations http://scholar.google.com/citations?user=OWX_2eAAAAAJ
>>
>
>
>
> --
> Miltinho - mcr at rc.unesp.br
> Laboratório de Ecologia Espacial e Conservação - LEEC
> Depto de Ecologia - UNESP - Rio Claro
> Av. 24A, 1515- Bela Vista
> 13506-900 Rio Claro, SP, Brasil
>
> Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
> Cel: 19 9853-3220 / 19 9853-5430
>
> Depto Ecologia http://ib.rc.unesp.br/#!/departamentos/ecologia/
> PG ECO & BIODIV
> http://ib.rc.unesp.br/#!/departamentos/ecologia/pos-graduacao-em-ecologia-e-biodiversidade/
>
> CV
> http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6&mostrarNroCitacoesISI=true&mostrarNroCitacoesScopus=true
>
> Google citations http://scholar.google.com/citations?user=OWX_2eAAAAAJ
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140118/927f45b8/attachment-0001.html>


More information about the grass-user mailing list