def start(): # XXX: As root, this is not safe: eventually will use mod_python. sbdjango.startServer("settings", HOST, PORT, pythonPath=WB_PATH)
if not wbPath: raise Exception("Cannot find wikidbase installation path") settingsFile = os.path.join(wbPath, "wikidbase", "settings.py") debugOutput("settingsFile: %s" % settingsFile) return open(settingsFile, "r").read() # # DOH! # #resource_string("wikidbase","settings.py") # This seems to fail imediately after doing easy_install wikidbase, must have to refesh import path or something. import imp result = imp.find_module("wikidbase") if result and result[1]: wbPath = result[1] else: raise Exception("Cannot find wikidbase installation path") settingsFile = os.path.join(wbPath, "settings.py") debugOutput("settingsFile: %s" % settingsFile) return open(settingsFile, "r").read() if __name__ == "__main__": debugOutput("Testing") install() sbdjango.startServer("settings", "0.0.0.0", 8383, WB_PATH, block=True)
settingsFile = os.path.join(wbPath, "wikidbase", "settings.py") debugOutput("settingsFile: %s" % settingsFile) return open(settingsFile,"r").read() # # DOH! # #resource_string("wikidbase","settings.py") # This seems to fail imediately after doing easy_install wikidbase, must have to refesh import path or something. import imp result = imp.find_module("wikidbase") if result and result[1] : wbPath = result[1] else : raise Exception("Cannot find wikidbase installation path") settingsFile = os.path.join(wbPath, "settings.py") debugOutput("settingsFile: %s" % settingsFile) return open(settingsFile,"r").read() if __name__ == "__main__" : debugOutput("Testing") install() sbdjango.startServer("settings", "0.0.0.0", 8383, WB_PATH, block=True)