Problem with calling open_wks in pyNGL

From: John Dennis <dennis_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 06 2014 - 12:19:29 MST

        So I am running a pyNGL script and am having problems calling Ngl.open_wks.
Maybe you can suggest a way around it. In particular I would like to call Ngl.open_wks with
different names that I construct by iterating through a dictionary. So the code looks like the
following:

        for k,v in vars.iteritems():
              name = k + "_panel"
              wks = Ngl.open_wks(plottype,name,wkres)

    Unfortunately it give me the following error. I am wondering why the second argument to
method open_wks_wrap is a 'char const *' and not just a 'char *'

Thanks,
John Dennis

        wks = Ngl.open_wks(plottype,name,wkres)
      File "/glade/apps/opt/PyNGL/1.4.0/gnu/4.7.2/PyNGL/Ngl.py", line 4540, in open_wks
         iopn = open_wks_wrap(wk_type,wk_name,rlist1,rlist2,pvoid())
      TypeError: in method 'open_wks_wrap', argument 2 of type 'char const *'

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Feb 6 12:19:41 2014

This archive was generated by hypermail 2.1.8 : Mon Apr 14 2014 - 11:43:53 MDT