1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #! /usr/bin/env python3
- # ------------------------------------------------
- # help
- # ------------------------------------------------
- """
- * PYCASSO - PYthon Compile And Setup Scripts Organizer *
- NAME
- pycasso_setup_tm5 - compile and setup 'TM5' application
- DESCRIPTION
- Driver script to compile and setup a model application.
- For information on arguments and options, try:
-
- pycasso_setup_tm5 [-h|--help]
-
- RETURN VALUE
- Non zero in case of any error.
-
- """
- # ------------------------------------------------
- # settings
- # ------------------------------------------------
- # path to the PYCASSO modules
- import os, sys
- pycasso_path = os.path.dirname(sys.argv[0])
- # name of file with PYCASSO user scripts for this setup:
- pycasso_user_scripts = 'pycasso_user_scripts_tm5'
- # ------------------------------------------------
- # begin
- # ------------------------------------------------
- if __name__ == '__main__':
- # import standard modules:
- import logging
- import traceback
-
- # add location of PYCASSO modules to search path:
- sys.path.insert(0, pycasso_path)
-
- # import PYCASSO tools:
- import pycasso
-
- # extract arguments from sys.argv array:
- # 0 = name of calling script, 1: = actual arguments
- args = sys.argv[1:]
-
- # call main routine, parse arguments and name of module with user scripts:
- try :
- pycasso.Main( args, pycasso_user_scripts )
- except :
- for line in traceback.format_exc().split('\n') : logging.error(line)
- logging.error( 'exception from pycasso.Main' )
- sys.exit(1)
-
- sys.exit(0)
|