Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-14 Thread Markus Neteler
On Tue, May 13, 2014 at 10:23 PM, Glynn Clements wrote: > > Markus Neteler wrote: > >> I tried my current start-python-and-create-a-location script on Windows. >> The location is generated but then a call of the scripting library fails >> with a gettext error (I print the os.environment to underst

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-13 Thread Glynn Clements
Markus Neteler wrote: > I tried my current start-python-and-create-a-location script on Windows. > The location is generated but then a call of the scripting library fails > with a gettext error (I print the os.environment to understand more but no > idea): > "C:\OSGeo4W\apps\grass\grass-7.1.svn

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-13 Thread Markus Neteler
Hi, I tried my current start-python-and-create-a-location script on Windows. The location is generated but then a call of the scripting library fails with a gettext error (I print the os.environment to understand more but no idea): Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-12 Thread Glynn Clements
Vaclav Petras wrote: > > Even if you can load the library, you probably aren't going to be able > > to do much with it unless GISRC is set. > > I hoped that this is what `grass.script.setup.init` is doing. Fair enough. However, that's going to be subject to a number of of chicken-and-egg probl

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-10 Thread Vaclav Petras
On Sat, May 10, 2014 at 1:31 PM, Glynn Clements wrote: > > Vaclav Petras wrote: > > > going back to list because it is apparently a general problem. The answer > > is no. I haven't resolved this. > > > > Intro for others: currently, it is not possible to use ctypes API (and > thus > > PyGRASS) in

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-10 Thread Glynn Clements
Vaclav Petras wrote: > going back to list because it is apparently a general problem. The answer > is no. I haven't resolved this. > > Intro for others: currently, it is not possible to use ctypes API (and thus > PyGRASS) in standalone Python script which is not GRASS module (script > running ou

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-09 Thread Vaclav Petras
On Fri, May 9, 2014 at 9:12 AM, Markus Neteler wrote: > On Fri, May 9, 2014 at 11:52 AM, Moritz Lennert > wrote: > > On 09/05/14 10:59, Markus Neteler wrote: > >> > >> Hi, > >> > >> I get it running (on Linux, winGRASS untested) when setting up the > >> LD_LIBRARY_PATH at system level: > >> > >>

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-09 Thread Markus Neteler
On Fri, May 9, 2014 at 11:52 AM, Moritz Lennert wrote: > On 09/05/14 10:59, Markus Neteler wrote: >> >> Hi, >> >> I get it running (on Linux, winGRASS untested) when setting up the >> LD_LIBRARY_PATH at system level: >> >> su >> echo "`grass71 --config path`/lib" > /etc/ld.so.conf.d/grass71.conf >

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-09 Thread Moritz Lennert
On 09/05/14 10:59, Markus Neteler wrote: Hi, I get it running (on Linux, winGRASS untested) when setting up the LD_LIBRARY_PATH at system level: su echo "`grass71 --config path`/lib" > /etc/ld.so.conf.d/grass71.conf ldconfig exit # run as normal user: python python_test_ctypes.py ... precip_an

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-09 Thread Markus Neteler
Hi, I get it running (on Linux, winGRASS untested) when setting up the LD_LIBRARY_PATH at system level: su echo "`grass71 --config path`/lib" > /etc/ld.so.conf.d/grass71.conf ldconfig exit # run as normal user: python python_test_ctypes.py ... precip_annual@user1 /home/neteler/grassdata/nc_spm_0

Re: [GRASS-dev] Calling GRASS from outside: cannot open shared object file

2014-05-08 Thread Vaclav Petras
Hi Markus, going back to list because it is apparently a general problem. The answer is no. I haven't resolved this. Intro for others: currently, it is not possible to use ctypes API (and thus PyGRASS) in standalone Python script which is not GRASS module (script running outside GRASS session).

[GRASS-dev] Calling GRASS from outside: cannot open shared object file

2013-02-18 Thread Vaclav Petras
Hi, I've tried to use GRASS without starting it explicitly in Python. I've used example from wiki [1] which works. However, when I tried to use library functions through ctypes, I'm not able to import lib modules. I've added these lines to the example: import grass.lib.gis as gis print gis.G_loca