title: How to show tweets with tweepy on the pyramid framework?
body: <p>i have the next code:</p>
  
  <pre><code>from wsgiref.simple_server import make_server
  from pyramid.config import Configurator
  from pyramid.response import Response
  import tweepy
  
  consumer_key=""
  consumer_secret=""
  access_key = ""
  access_secret = "" 
  
  def twitterfeed():
      auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
      auth.set_access_token(access_key, access_secret)
      api = tweepy.API(auth)
      statuses = tweepy.Cursor(api.friends_timeline).items(20)
      for status in statuses:
          return list(str(status.text))
  </code></pre>
  
  <p>this twitterfeed() method is working on the bash/console, and shows the latest tweets of me and my subscribers. But when i want to show this tweets on the page:</p>
  
  <pre><code>if __name__ == '__main__':
      config = Configurator()
      config.add_route('hello', '{name}')
      config.add_view(twitterfeed(), route_name='hello')
      app = config.make_wsgi_app()
      server = make_server('0.0.0.0', 8080, app)
      server.serve_forever()
  </code></pre>
  
  <p>it shows me <code>pyramid.exceptions.ConfigurationExecutionError: &lt;type 'exceptions.AttributeError'&gt;: 'list' object has no attribute '__module__'
    in:
    Line 24</code> error</p>
  
  <p>how can i fix it? if you have working example from django, it can help me.</p>