import cherrypy import foo #foo is the other file... cherrypy.root= foo.test() cherrypy.server.start()