title: List image paths - 'Namespace' object has no attribute '__getitem__'
body: <p>I'm trying to return the image path, as follows:</p>
  
  <pre><code>from imutils import paths
  import argparse
  
  # create parser
  parser = argparse.ArgumentParser()
  # define the command-line options
  parser.add_argument('--dataset', required=True,help='path to the dataset')
  # read the command-line arguments and interpret them
  args = parser.parse_args()
  
  imagePath = paths.list_images(args['dataset'])
  
  print imagePath
  </code></pre>
  
  <p>But, getting the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 11, in &lt;module&gt;
      imagePath = paths.list_images(args['dataset'])
  TypeError: 'Namespace' object has no attribute '__getitem__'
  </code></pre>
  
  <p>I ran the script by typing the following command:</p>
  
  <pre><code>$ python test.py --dataset /images
  </code></pre>
  
  <p>Any idea what I'm doing wrong here?</p>
  
  <p>Thanks.</p>