Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def parser(self,command):
- errorHandler=True;
- commandA=command.split(' ');
- parse = argparse.ArgumentParser(description='Argument parser');
- while switch(commandA[0]):
- if case('scan'):
- parse.add_argument('--qvw', action='append_const', const=str, help='path to qlikview file with name');
- parse.add_argument('--xlsx', action='append_const', const=str, help='path to xlsx file with name');
- args=parse.parse_args();
- break;
- if case('example'):
- parse.add_argument('--name', type=str, help='file name');
- args=parse.parse_args();
- break;
- if case('change'):
- parse.add_argument('--qvw', type=str, help='path to qlikview file with name');
- parse.add_argument('--xlsx', type=str, help='path to xlsx file with name');
- args=parse.parse_args();
- break;
- errorHandler=False;
- break;
- if(errorHandler!=False):
- return args;
- else:
- return errorHandler;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement