123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #! /usr/bin/env python
- # ------------------------------------------------
- # help
- # ------------------------------------------------
- """
- * PYCASSO - PYthon Compile And Setup Scripts Organizer *
- NAME
- pycasso_setup_template - compile and setup 'template' application
- DESCRIPTION
- Driver script to compile and setup a model application.
- This script is the original PYCASSO setup script template.
- It should be copied to a new name, e.g. 'setup_<yourmodel>'
- and editted to match the model's needs.
- For information on arguments and options, try:
-
- pycasso_setup_template [-h|--help]
-
- RETURN VALUE
- Non zero in case of any error.
- """
- # ------------------------------------------------
- # settings
- # ------------------------------------------------
- # path to the PYCASSO modules
- # (specify as a tupple, path seperation character is inserted below)
- pycasso_path = ('.','base','py')
- # name of file with PYCASSO user scripts for this setup:
- pycasso_user_scripts = 'pycasso_user_scripts_template'
- # ------------------------------------------------
- # begin
- # ------------------------------------------------
- if __name__ == '__main__':
- # import standard modules:
- import os
- import sys
- import logging
-
- # prepend location of PYCASSO modules to search path:
- sys.path.insert( 0, os.path.join(*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 :
- logging.error( sys.exc_info()[1] )
- logging.error( 'exception from pycasso.Main' )
- sys.exit(1)
- #endtry
-
- # ok:
- sys.exit(0)
- #endif
- # ------------------------------------------------
- # end
- # ------------------------------------------------
|