Re: Problem with calling open_wks in pyNGL

From: John Dennis <dennis_at_nyahnyahspammersnyahnyah>
Date: Fri Feb 07 2014 - 16:32:01 MST

Mary,

        The values of k in this loop are strings that correspond to variable names. For example
"CLDLOW", "CLDMED", "CLDHGH", "FSNTOA", …

John

On Feb 7, 2014, at 4:28 PM, Mary Haley wrote:

> 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
>
Received on Fri Feb 7 16:32:07 2014

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