9 __author__ =
"Sebastien Binet"
10 __doc__ =
"main command line script for the general purpose athena scripts"
12 import PyUtils.acmdlib
as acmdlib
16 import PyUtils.scripts
17 import PyUtils.Logging
as L
18 msg = L.logging.getLogger(
'Acmd')
19 msg.setLevel(L.logging.INFO)
24 for i
in range(1,len(sys.argv)):
25 cmd_name =
'.'.
join(sys.argv[1:i+1])
26 if acmdlib.Plugins.exists(cmd_name):
27 cmd = acmdlib.Plugins.load(cmd_name)
32 acmdlib.Plugins.loadAll()
34 parser = acmdlib.ACMD_PARSER
35 args = parser.parse_args()
39 exitcode = cmd.main(args)
42 print(sys.exc_info()[0])
43 print(sys.exc_info()[1])
49 if __name__ ==
"__main__":