#965: Location wizard: doesn't create MYNAME
---------------------+------------------------------------------------------
Reporter: hamish | Owner: martinl
Type: defect | Status: reopened
Priority: normal | Milestone: 6.4.1
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: location wizard
Platform: All | Cpu: All
---------------------+------------------------------------------------------
Comment(by glynn):
Replying to [comment:7 martinl]:
> > Or better: can python access the #defined values in the C include
files directly as swig could?
>
> Could be accessed using ctypes. Currently wxGUI is not using ctypes
(except of 3D view mode).
They don't exist in the library, so you can't access them directly via
ctypes in the same way as variables (i.e.
ctypes.CDLL("libgrass_gis.so").GNAME_MAX won't work). However, ctypesgen
includes preprocessor macros in the generated files, so they are present
in the grass.lib.*.py modules.
Even so, simply importing grass.lib.* will load the corresponding dynamic
library, which may kill the importing process if there are any problems
(e.g. architecture or version mismatches), so I wouldn't recommend it.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/965#comment:9>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev