Hello!
I am trying to figure out to set a custom port and IP in my web.py
application. The startup looks like below.
What would be the appropriate place to set the IP and port?
Thanks,
Caden
#!/usr/bin/env python
import web
import sys
import os
singleton_webgui = None
class WebGUI():
def __init__(self):
self.urls = (
'/', 'index',
'', 'index',
'/config', 'config')
def main(self):
self.app = web.application(self.urls, globals())
self.app.run()
if __name__ == "__main__":
# We have to change the working directory to the directory of the
WebGUI script
# If we don't, the script can't find all of the static and template files
pathname = os.path.dirname(sys.argv[0])
os.chdir(os.path.abspath(pathname))
singleton_webgui = WebGUI()
singleton_webgui.main()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---