Changeset 1339 for trunk/libIGCM/libIGCM_post/xios_parser.py
- Timestamp:
- 08/17/16 10:09:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_post/xios_parser.py
r1337 r1339 13 13 #************************************************************** 14 14 15 import os, pwd, sys, traceback, argparse , readline, rlcompleter15 import os, pwd, sys, traceback, argparse 16 16 import xml.etree.ElementTree as ET 17 readline.parse_and_bind("tab: complete") 17 #import readline, rlcompleter 18 #readline.parse_and_bind("tab: complete") 18 19 19 20 indent = 0 … … 50 51 51 52 def findField(root): 52 """Recursively find and list field tag with ID or field_refattribute."""53 """Recursively find and list field tag with "id" or "field_ref" attribute.""" 53 54 global fromField 54 55 global fromFile … … 104 105 # Compare the two lists. fromField must be a superset of fromFile. 105 106 if set(fromField).issuperset(set(fromFile)): 106 if args.verbosity >= 1: print ' ALL GOOD with %s' % (inputFile)107 if args.verbosity >= 1: print '\nALL GOOD with %s' % (inputFile) 107 108 if args.verbosity >= 3: print 'fromField=', fromField 108 109 if args.verbosity >= 3: print 'fromFile=', fromFile 109 110 else: 110 if args.verbosity >= 1: print ' TROUBLE AHEAD with %s' % (inputFile)111 if args.verbosity >= 1: print '\nTROUBLE AHEAD with %s' % (inputFile) 111 112 if args.verbosity >= 3: print ', '.join(sorted(list(set(fromFile)-set(fromField)))) 112 113 # Identify fields in fromFile but not in fromField … … 175 176 except KeyboardInterrupt: 176 177 print "Shutdown requested...exiting" 177 except Exception:178 traceback.print_exc(file=sys.stdout)178 #except Exception: 179 # traceback.print_exc(file=sys.stdout) 179 180 sys.exit(0)
Note: See TracChangeset
for help on using the changeset viewer.