mgood@110: #!/usr/bin/python cmlenz@4: import pkg_resources cmlenz@4: pkg_resources.require("TurboGears") cmlenz@4: cmlenz@4: import turbogears cmlenz@4: import cherrypy cmlenz@4: cherrypy.lowercase_api = True cmlenz@4: cmlenz@4: from os.path import * cmlenz@4: import sys cmlenz@4: cmlenz@4: # first look on the command line for a desired config file, cmlenz@4: # if it's not on the command line, then cmlenz@4: # look for setup.py in this directory. If it's not there, this script is cmlenz@4: # probably installed cmlenz@4: if len(sys.argv) > 1: cmlenz@4: turbogears.update_config(configfile=sys.argv[1], cmlenz@230: modulename="genshitest.config") cmlenz@4: elif exists(join(dirname(__file__), "setup.py")): cmlenz@4: turbogears.update_config(configfile="dev.cfg", cmlenz@230: modulename="genshitest.config") cmlenz@4: else: cmlenz@4: turbogears.update_config(configfile="prod.cfg", cmlenz@230: modulename="genshitest.config") cmlenz@4: cmlenz@230: from genshitest.controllers import Root cmlenz@4: cmlenz@4: turbogears.start_server(Root())