[GRASS-dev] WinGrass65 + import gui_modules.nviz_tools as nviz_tools: ImportError

Martin Landa landa.martin at gmail.com
Sat Jun 19 13:53:01 EDT 2010


Hi,

2010/6/6 Glynn Clements <glynn at gclements.plus.com>:
>> "WARNING: Nviz extension (3D view mode) disabled. Reason: intl not found."
>
> It's odd that this only occurs when loading libraries dynamically via
> Python.
>
> libintl is required by all GRASS modules; not only is it used directly
> by G_gettext(), but <libintl.h> (which is included from
> <grass/glocale.h>) defines printf() etc as macros which refer to
> libintl_printf() etc.

the installation constains only libint3 and libintl-8 dll libraries, see

$ find /c/Program\ Files\ \(x86\)/GRASS-70-SVN/ -name libint*.dll
/c/Program Files (x86)/GRASS-70-SVN/extralib/libintl-8.dll
/c/Program Files (x86)/GRASS-70-SVN/extralib/libintl3.dll

When compiling /lib/python/ against `lintl3` instead of `lintl`,
grass.libs.grass can be imported, but its empty.

import grass.lib.grass as grass
help(grass)

Help on module grass.lib.grass in grass.lib:

NAME
    grass.lib.grass - Wrapper for gis.h

FILE
    c:\program files (x86)\grass-70-svn\etc\python\grass\lib\grass.py

DESCRIPTION
    Generated with:
    ./ctypesgen.py --cpp gcc -E -D_FILE_OFFSET_BITS=64     -I/osgeo4w/usr/src/gr
ass_trunk/dist.i686-pc-mingw32/include -I/osgeo4w/usr/src/grass_trunk/dist.i686-
pc-mingw32/include -lgrass_gis.7.0.svn -lintl -lintl3 c:/osgeo4w/usr/src/grass_t
runk/dist.i686-pc-mingw32/include/grass/gis.h c:/osgeo4w/usr/src/grass_trunk/dis
t.i686-pc-mingw32/include/grass/gisdefs.h -o grass.py

    Do not modify this file.

FUNCTIONS
    FormatError(...)
        FormatError([integer]) -> string

        Convert a win32 error code into a string. If the error code is not
        given, the return value of a call to GetLastError() is used.

    addressof(...)
        addressof(C instance) -> integer
        Return the address of the C instance internal buffer

    alignment(...)
        alignment(C type) -> integer
        alignment(C instance) -> integer
        Return the alignment requirements of a C instance

    byref(...)
        byref(C instance) -> byref-object
        Return a pointer lookalike to a C instance, only usable
        as function argument

    resize(...)
        Resize the memory buffer of a ctypes instance

    set_conversion_mode(...)
        set_conversion_mode(encoding, errors) -> (previous-encoding, previous-er
rors)

        Set the encoding and error handling ctypes uses when converting
        between unicode and strings.  Returns the previous values.

    sizeof(...)
        sizeof(C type) -> integer
        sizeof(C instance) -> integer
        Return the size in bytes of a C instance
...

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa


More information about the grass-dev mailing list