Skip to content
Permalink
Browse files

Renaming .attributes to .attrs

  • Loading branch information...
castelao committed Dec 27, 2018
1 parent d6ab27a commit ede661807957459b8673a16c7f2559d847696f3e
Showing with 103 additions and 100 deletions.
  1. +1 −1 HISTORY.rst
  2. +1 −1 README.rst
  3. +4 −4 seabird/cli.py
  4. +89 −86 seabird/cnv.py
  5. +6 −6 seabird/netcdf.py
  6. +1 −1 seabird/test/test_parse.py
  7. +1 −1 seabird/test/test_serialize.py
@@ -78,7 +78,7 @@ History

* Refactoring. Parsed text is saved in self.parsed, preparing to output
everything that wasn't specifically parsed.
* XML is extracted into self.attributes['awkward_xml']
* XML is extracted into self.attrs['awkward_xml']

0.1.7
-----
@@ -68,7 +68,7 @@ In a python script, one can use like this:

profile = fCNV('your_file.cnv')

profile.attributes # It will return the header, as a dictionary.
profile.attrs # It will return the header, as a dictionary.

profile.keys() # It will list the available variables.

@@ -32,14 +32,14 @@ def dump(inputfilename):

print("file: %s" % inputfilename)
print("Global attributes")
for a in sorted(data.attributes.keys()):
print("\t\033[93m%s\033[0m: %s" % (a, data.attributes[a]))
for a in sorted(data.attrs.keys()):
print("\t\033[93m%s\033[0m: %s" % (a, data.attrs[a]))

print("\nVariabes")
for k in data.keys():
print("\033[91m%s\033[0m" % k)
for a in data[k].attributes.keys():
print("\t\033[93m%s\033[0m: %s" % (a, data[k].attributes[a]))
for a in data[k].attrs.keys():
print("\t\033[93m%s\033[0m: %s" % (a, data[k].attrs[a]))

@cli.command(name='cnv2nc')
@click.option('--outputfilename', default=None,
Oops, something went wrong.

0 comments on commit ede6618

Please sign in to comment.
You can’t perform that action at this time.