Commits

Francois Dion  committed 89aa2b0

Missing if __name__ ==

  • Participants
  • Parent commits 9e0101c

Comments (0)

Files changed (2)

File webpy/helloworld/hw2.py

         return 'Hello, World!'
 
 # urls to dispatch
-URLS = ( '/.*', All,
+URLS = ( '/.*', 'All',
 )
 # setting up a web app
-app = web.application(URLS, globals())
-app.run()
+if __name__ == '__main__' :
+    app = web.application(URLS, globals())
+    app.run()

File webpy/helloworld/hw3.py

     def GET(self):
         return 'Goodbye, World!'
 
-app.run()
+if __name__ == '__main__' :
+    app.run()