ttest_regression_tools.py - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
 (HTM) git clone git://src.adamsgaard.dk/pism
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       ttest_regression_tools.py (637B)
       ---
            1 #!/usr/bin/env python3
            2 import os
            3 import sys
            4 
            5 print("Test # 0: presence of tools and Python modules needed by other tests.")
            6 
            7 tools = ["ncpdq", "ncap2", "ncks", "ncrename", "diff", "rm", "cp"]
            8 for tool in tools:
            9     print("Looking for %s..." % tool)
           10     if os.system("which %s" % tool) != 0:
           11         print("ERROR: %s does not seem to be on the PATH!" % tool)
           12         sys.exit(1)
           13 
           14 modules = ["numpy", "sys", "netCDF4"]
           15 for module in modules:
           16     try:
           17         print("Trying to import %s..." % module)
           18         __import__(module)
           19         print("OK.")
           20     except:
           21         print("\nERROR: Python cannot import %s" % module)
           22         sys.exit(1)