title: How to pass parameters on command line without using flags in python
body: <p>So I have my main.py script which essentially will run certain conditional statements based on what is passed on the command-line. For example , if I use <code>main.py -t</code>, this will run test mode. If I run <code>main.py -j /testdata -c 2222-22-22 -p 2222-22-22</code> this will run default mode and so on.</p>
  
  <p>How can I stop passing in the flags on command line and be able to run my code, so rather than using the flags -j , -c and -p , I can just pass the values normally .</p>
  
  <p>My code is as follows so far : </p>
  
  <pre><code>def main():
  
      parser = argparse.ArgumentParser()
      parser.add_argument("-c", "--execute-cur-date", action="store", required=False)
      parser.add_argument("-p", "--execute-pre-date", action="store", required=False)
      parser.add_argument("-j", "--execute-json-path", action="store", required=False)
      parser.add_argument("-t", "--execute-test", action="store_true", required=False)
      args = parser.parse_args()
  
      if args.execute_test:
  
          testing()
  
      elif args.execute_json_path and args.execute_cur_date and args.execute_pre_date:
  </code></pre>