ncarg and scripting languages

From: Phil Austin (phil AT unknown)
Date: Fri Jun 06 1997 - 10:31:47 MDT


I'm looking for help/information/examples on calling NCAR hlu routines
from scripting languages. Specifically, I have 2 engineering
coop students working on an object-oriented interface, written
in Python, that will support gnuplot, gmt, gist, plplot, and
ncar graphics. Our first, naive attempt at wrapping hlu calls
under Python's C extension fails to run, with errors like:

<awan@curlew: awan/HLU> python test.py
warning:GKS:GESC: --CONTENTS OF ESCAPE DATA RECORD ARE INVALID
fatal:OpenWorkstation:libncarg Error:NGSETI - Uncleared prior error
warning:GKS:GESC: --CONTENTS OF ESCAPE DATA RECORD ARE INVALID
fatal:Unable to open Workstation-Can't Create
fatal:_NhlCreate:Invalid Parent id #-4
fatal:NhlDraw: Invalid Layer Id: 0
fatal:Unable to update Workstation with PID#-4
fatal:Unable to clear Workstation with PID#-4

It looks like we are missing information about the state of the
various children created by these functions, and without the
hlu source it's hard to get an idea of exactly how the
various states are maintained. Doing this with the llu
calls works without a problem, but the resource are obviously
something we'd like to exploit if at all possible.

Questions:

1) Is anyone out there using hlu under Perl, Python, TCL, guile,
Javascript, etc.

2) Have the ncarg maintainers considered offering some examples
of how to do this? One possibility would be a swig interface
file (http://www.cs.utah.edu/~beazley/SWIG). If we could successfully
wrap the hlu headers, SWIG would generate glue code for all of
the scripting languages I've listed above (except Javascript). The benefits for
ncarg would be considerable--anyone following the discussions on
the Python numerics, Perl data language, octave or rlab mailing lists
knows that there are a lot of interpreted languages looking for
a solid graphics package. The combined community of scientists
working with these array languages has to be
several orders of magnitude larger than the ncl user group.

3) If we are in fact breaking new ground here, would it be possible
to get the hlu source so we could build a debugging version of
the library and set some break points?

Regards, Phil Austin

Phil Austin INTERNET: phil AT unknown
(604) 822-2175 FAX: (604) 822-6150

http://www.geog.ubc.ca/~phil
Associate Professor
Atmospheric Sciences Programme
Geography #217
University of British Columbia
1984 W Mall
Vancouver, BC V6T 1Z2
CANADA



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:40:32 MDT