title: "TypeError": 'list' object is not callable flask
body: <p>I am trying to show the list of connected devices in browser using flask. I enabled flask on port 8000:</p>
  
  <p>in server.py:</p>
  
  <pre><code>@server.route('/devices',methods = ['GET'])
  def status(): 
      return app.stat()
  
  if __name__ == '__main__':
          app.run()
  </code></pre>
  
  <p>in app.py:    </p>
  
  <pre><code>def stat():
      return(glob.glob("/dev/tty57") + glob.glob("/dev/tty9"))
  </code></pre>
  
  <p>And this is my test:</p>
  
  <pre><code>url = "http://127.0.0.1:8000"
  
  response = requests.get(url + "").text
  print response
  </code></pre>
  
  <p>but I keep getting this error:</p>
  
  <pre><code>"TypeError": 'list' object is not callable.
  </code></pre>
  
  <p>Am I doing sth wrong in checking if ttyUSB, ... and other devices existing?</p>