Re: Problem with calling open_wks in pyNGL

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Feb 07 2014 - 16:28:09 MST

Hi John,

I'll look into this. What are the values of "k" in this loop?

--Mary

On Feb 6, 2014, at 12:19 PM, John Dennis <dennis@ucar.edu> wrote:

>
> 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

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Fri Feb 7 16:28:20 2014

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