I've added another folder into my project so I can pull methods from files in another project. I did this with the first 3 lines
import sys
import os
sys.path.insert(0, '/path/to/another/dir')
from file_methods import load_object
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("path")
args = parser.parse_args()
print(args['path'])
When doing simple argparse, I'm getting the error:
Traceback (most recent call last):
File "read_pupil_data.py", line 16, in <module>
print(args['path'])
TypeError: 'Namespace' object is not subscriptable
How do I access this namespace?