Skip to content

Instantly share code, notes, and snippets.

@ShinNoNoir
Created September 25, 2012 07:58
Show Gist options
  • Save ShinNoNoir/3780531 to your computer and use it in GitHub Desktop.
Save ShinNoNoir/3780531 to your computer and use it in GitHub Desktop.
Working around a web.py bug...
import web
urls = (
'/', 'index',
# etc...
)
class index:
def GET(self):
pass
# etc...
def workaround_issue175():
# https://github.com/webpy/webpy/issues/175
import os
import sys
sys.path.append(os.path.dirname(__file__))
if __name__ == '__main__':
workaround_issue175()
app = web.application(urls, globals())
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment