source: nappy/trunk/test/testWrites.py @ 339

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/test/testWrites.py@339
Revision 339, 569 bytes checked in by astephen, 15 years ago (diff)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1import sys ; sys.path.append("..")
2import naCore, textParser, naFile, general
3reload(naCore) ; reload(textParser) ; reload(naFile) ; reload(general)
4
5for ffi in [1001, 2010, 3010, 4010]:
6    x=general.openNAFile(r'../data_files/%s.na' % ffi)
7    d=x.getNADict()
8    del d["FFI"]
9
10    print "Writing output file output/out%s.na..." % ffi
11    y=general.openNAFile(r'..\output\out%s.na' % ffi, 'w', d)
12    print "\nFile written successfully, so let's open it."
13
14    x=general.openNAFile(r'..\output\out%s.na' % ffi)
15    print "variables are:\n"
16    print x.getVariables()
Note: See TracBrowser for help on using the repository browser.