diff --git a/examples/python/grib_keys_iterator.py b/examples/python/grib_keys_iterator.py index fe4607ea8..0e834f4a0 100644 --- a/examples/python/grib_keys_iterator.py +++ b/examples/python/grib_keys_iterator.py @@ -39,7 +39,7 @@ def example(): while codes_keys_iterator_next(iterid): keyname = codes_keys_iterator_get_name(iterid) - keyval = codes_get_string(iterid, keyname) + keyval = codes_get_string(gid, keyname) print("%s = %s" % (keyname, keyval)) codes_keys_iterator_delete(iterid) diff --git a/examples/python/grib_ls_JSON.py b/examples/python/grib_ls_JSON.py index 377cbecf8..c179c198b 100644 --- a/examples/python/grib_ls_JSON.py +++ b/examples/python/grib_ls_JSON.py @@ -44,7 +44,7 @@ def do_print(namespace, INPUT): f1 = True while codes_keys_iterator_next(iterid): keyname = codes_keys_iterator_get_name(iterid) - keyval = codes_get_string(iterid, keyname) + keyval = codes_get_string(gid, keyname) if not f1: print(',') else: diff --git a/examples/python/keys_iterator_gts.py b/examples/python/keys_iterator_gts.py index 8d5ae116c..7a3277717 100644 --- a/examples/python/keys_iterator_gts.py +++ b/examples/python/keys_iterator_gts.py @@ -23,11 +23,11 @@ def example(): f = open(INPUT, 'rb') while 1: - bid = gts_new_from_file(f) - if bid is None: + gid = gts_new_from_file(f) + if gid is None: break - iterid = codes_keys_iterator_new(bid) + iterid = codes_keys_iterator_new(gid) # Different types of keys can be skipped # codes_skip_computed(iterid) @@ -36,11 +36,11 @@ def example(): while codes_keys_iterator_next(iterid): keyname = codes_keys_iterator_get_name(iterid) - keyval = codes_get_string(iterid, keyname) + keyval = codes_get_string(gid, keyname) print("%s = %s" % (keyname, keyval)) codes_keys_iterator_delete(iterid) - codes_release(bid) + codes_release(gid) f.close()