# # read config file # config_file_name=sys.argv[1] # try: # config_file = open(config_file_name) # config = ConfigParser() # config.readfp(config_file) # conf_dir = os.path.dirname(os.path.abspath(config_file.name)) # except Exception: # exit("Cannot read config file: " + config_file_name) # # get app config values # try: # wget_path = config.get(APP_NAME,'wget.path') # mirrors = [x.strip() for x in # config.get(APP_NAME,'mirrors.active.list').split(',')] # plugins = [x.strip() for x in # config.get(APP_NAME,'plugins.active.list').split(',')] # except Exception: # exit("Bad configuration option in: " + APP_NAME) json = '{ "command": "date" }' cf = CommandFactory() cmd = cf.createCommand(json) output = cmd.__exec__() print output