def start_server(): #check to make sure everything is set up properly if "cleanup" in sys.argv: DatabaseManager.cleanup(join(converted, "sets.db")) else: if len(sys.argv) < 3: print "Usage: " + sys.argv[0] + " <ip address> <port>" exit(0) app = main() server = make_server(sys.argv[1], int(sys.argv[2]), app) print "Server is going up now" server.serve_forever()
def setUp(self): from protvis import main app = main({}) self.test_app = TestApp(app)