示例#1
0
def start():
    # XXX: As root, this is not safe: eventually will use mod_python.
    sbdjango.startServer("settings", HOST, PORT, pythonPath=WB_PATH)
示例#2
0
def start():
  # XXX: As root, this is not safe: eventually will use mod_python.
  sbdjango.startServer("settings", HOST, PORT, pythonPath=WB_PATH)
示例#3
0
    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)
示例#4
0
  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)