Advertisement
Guest User

segfaulting neo4j/paste code

a guest
Oct 29th, 2011
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. import neo4j
  2. from paste import httpserver, fileapp
  3. import tempfile
  4. from webob.dec import wsgify
  5. from webob import Response, Request
  6.  
  7. HOST = '127.0.0.1'
  8. PORT = 8080
  9.  
  10. class DebugApp(object):
  11.     @wsgify
  12.     def __call__(self, req):
  13.         db = neo4j.GraphDatabase(tempfile.mkdtemp())
  14.         return Response(body='it worked')
  15.  
  16. def main():
  17.     app = DebugApp()
  18.     httpserver.serve(app, host=HOST, port=PORT)
  19.  
  20. if __name__ == '__main__':
  21.     main()
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement