Permalink
Browse files

minor changes

  • Loading branch information...
1 parent 1aac2d0 commit 8305ee092c510f40c79330cd61a1e6255f428a03 @fiorix committed Jan 20, 2013
Showing with 3 additions and 6 deletions.
  1. +3 −6 demos/helloworld/helloworld.py
@@ -18,6 +18,7 @@
import cyclone.web
import sys
+
from twisted.internet import reactor
from twisted.python import log
@@ -27,15 +28,11 @@ def get(self):
self.write("Hello, world")
-def main():
- log.startLogging(sys.stdout)
+if __name__ == "__main__":
application = cyclone.web.Application([
(r"/", MainHandler)
])
+ log.startLogging(sys.stdout)
reactor.listenTCP(8888, application, interface="127.0.0.1")
reactor.run()
-
-
-if __name__ == "__main__":
- main()

0 comments on commit 8305ee0

Please sign in to comment.