Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (25 sloc) 1.03 KB
#! /usr/bin/env python
'''
M-LOOP Launcher
Starts an instance of M-LOOP configured using a configuration file.
Takes the following command line options
-c filename for configuration file
-h display help
the default name for the configuration is "ExpConfig.txt"
'''
import sys
import argparse
import mloop as ml
import mloop.launchers as mll
import multiprocessing as mp
def main(argv):
parser = argparse.ArgumentParser(description='M-LOOP Launcher \n Version:' + ml.__version__+'\n \n Starts a new instance of M-LOOP based a on configuration file.',
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('-c','--configFile',default='exp_config.txt',help='Filename of configuration file.')
parser.add_argument('-v','--version', action='version', version=ml.__version__)
args = parser.parse_args()
config_filename = args.configFile
_ = mll.launch_from_file(config_filename)
if __name__=="__main__":
mp.freeze_support()
main(sys.argv[1:])