source: CMIP6dreq/trunk/dreqPy/dreqCmdl.py @ 494

Subversion URL: http://proj.badc.rl.ac.uk/svn/exarch/CMIP6dreq/trunk/dreqPy/dreqCmdl.py@494
Revision 494, 833 bytes checked in by mjuckes, 4 years ago (diff)

next release

Line 
1"""
2Entry point for command line usage -- see ccinit for usage information.
3"""
4
5import scope, sys
6
7def main_entry():
8  """
9   Wrapper for use with setuptools.
10  """
11  if len(sys.argv) == 1:
12      # Show command-line info and report that you must provide arguments
13      print( scope.dreqUI.__doc__ )
14      print( "\nERROR: Please provide command-line arguments." )
15      return
16
17  if sys.argv[1] == '-v':
18      from __init__ import __version__, __versionComment__
19      print( 'dreqPy version %s [%s]' % (__version__,__versionComment__) )
20  elif sys.argv[1] == '--unitTest':
21      print( "Starting test suite 1" )
22      import simpleCheck
23      print( "Starting test suite 2" )
24      import example
25      print( "Tests completed" )
26  else:
27     x = scope.dreqUI(sys.argv[1:])
28     x.run()
29
30if __name__ == '__main__':
31  main_entry()
Note: See TracBrowser for help on using the repository browser.