Added for GRASS's SWIG interface, Hamish Bowman, 5 March 2008 # NumPtr - Numeric Pointer Module for Python (GPL2) # Homepage: http://geosci.uchicago.edu/csc/numptr/ # Tarball: http://geosci.uchicago.edu/csc/numptr/NumPtr-1.1.tar.gz # 23k .tgz ; 100k installed NumPtr is "a SWIGable module that makes it possible to access data stored in Numeric arrays as if they were normal C/C++ arrays. NumPtr was developed to make it possible to work with SWIG'ed C or Fortran climate codes from Python." How to build: cd NumPtr python setup.py build Run "python build/lib.linux-i686-2.4/test.py" to test and to create a byte-compiled version of the module (NumPtr.pyc). The .pyc file is platform independent and may be safely shared among systems. Even so, it doesn't hurt to do it ourselves to make sure we are using an up to date copy. How to install: Copy the fruits of the build into the same place as the GRASS SWIG module (_python_grass6.so etc.). for example: cp build/lib.linux-i686-2.4/*NumPtr.* ../ or to some place on your system: python setup.py install --prefix=/home/user or If you prefer you can put it in a directory pointed to by the PYTHONPATH environment variable, or use sys.path.append("/path/to/location/") before you import the module. Tutorial: http://www.penzilla.net/tutorials/python/numptr/ It is helpful have the Numeric python module (NumPy) installed too. http://numpy.scipy.org/ GRASS SWIG script example: See the examples/m.distance Modifications from the upstream tarball: * updated setup.py with current version number, upstream URL * removed old backup versions of a few files * removed binary lib/NumPtr.pyc. It will be automatically regenerated * update and GNUify src/Makefile (mostly unused) * added this file, VERSION file TODO: * incorporate the build into swig/python/Makefile, including setting an appropriate install destination. (use "setup.py install" to do the install or use the common Makefile method for that?)