title: Python FileNotFoundError: [Errno 2] No such file or directory:
body: <p>I am trying to open all the '*.json' files in a directory and get some data out of them</p>
  
  <pre><code>import json
  import os #os module imported here
  import glob
  
  path = 'C:\Saba\Python Workspace'
  
  for filename in os.listdir(path):
      if filename.endswith('.json'):
          with open(filename,'r') as f:
              data = json.load(filename)
              print(data['key'],end="*")
              for path in data['paths']:
                  print(path['method'],end="*")
                  for resources in path['resources']:
                      print(resources['key'],end="*")
  
  print("\b"+"$")
  </code></pre>
  
  <p><strong>This is the Error i get :</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "c:/Saba/Python Workspace/folder.py", line 9, in &lt;module&gt;
      with open(filename,'r') as f:
  FileNotFoundError: [Errno 2] No such file or directory: 'order-securityTransferOrders-service-v1.0.0-inventory.json'
  </code></pre>