def StartWebInterfaceThread(webInterface): current_dir = os.path.dirname(os.path.abspath(__file__)) cherrypy.config.update({'engine.autoreload_on':False}) cherrypy.config.update(configfile(webInterface.pface.web_config or "http.config")) conf = {'/css/style.css': {'tools.staticfile.on': True, 'tools.staticfile.filename': sharedfile('css/style.css'), }, '/images/control_xy.png': {'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_xy.png'), }, '/images/control_z.png': {'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_z.png'), }} cherrypy.config.update(configfile(webInterface.pface.web_config or "http.config")) cherrypy.quickstart(webInterface, '/', config = conf)
def StartWebInterfaceThread(webInterface): current_dir = os.path.dirname(os.path.abspath(__file__)) cherrypy.config.update({'engine.autoreload_on': False}) cherrypy.config.update( configfile(webInterface.pface.web_config or "http.config")) conf = { '/css/style.css': { 'tools.staticfile.on': True, 'tools.staticfile.filename': sharedfile('css/style.css'), }, '/images/control_xy.png': { 'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_xy.png'), }, '/images/control_z.png': { 'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_z.png'), } } cherrypy.config.update( configfile(webInterface.pface.web_config or "http.config")) cherrypy.quickstart(webInterface, '/', config=conf)
def __init__(self, pface): if (sys.version_info[1] > 6): # 'allow_no_value' wasn't added until 2.7 config = ConfigParser.SafeConfigParser(allow_no_value=True) else: config = ConfigParser.SafeConfigParser() config.read(configfile(pface.web_auth_config or 'auth.config')) users[config.get("user", "user")] = config.get("user", "pass") self.pface = pface global gPronterPtr global gWeblog self.name = "<div id='title'>Pronterface Web-Interface</div>" gWeblog = "" gPronterPtr = self.pface
def __init__(self, pface): if (sys.version_info[1] > 6): # 'allow_no_value' wasn't added until 2.7 config = ConfigParser.SafeConfigParser(allow_no_value = True) else: config = ConfigParser.SafeConfigParser() config.read(configfile(pface.web_auth_config or 'auth.config')) users[config.get("user", "user")] = config.get("user", "pass") self.pface = pface global gPronterPtr global gWeblog self.name = "<div id='title'>Pronterface Web-Interface</div>" gWeblog = "" gPronterPtr = self.pface
cherrypy.engine.exit() def StartWebInterfaceThread(webInterface): current_dir = os.path.dirname(os.path.abspath(__file__)) cherrypy.config.update({'engine.autoreload_on': False}) cherrypy.config.update( configfile(webInterface.pface.web_config or "http.config")) conf = { '/css/style.css': { 'tools.staticfile.on': True, 'tools.staticfile.filename': sharedfile('css/style.css'), }, '/images/control_xy.png': { 'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_xy.png'), }, '/images/control_z.png': { 'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_z.png'), } } cherrypy.config.update( configfile(webInterface.pface.web_config or "http.config")) cherrypy.quickstart(webInterface, '/', config=conf) if __name__ == '__main__': cherrypy.config.update(configfile("http.config")) cherrypy.quickstart(WebInterfaceStub())
gWeblog = re.sub("\n", "</br>", gWeblog)+log index.exposed = True class WebInterfaceStub(object): def index(self): return "<b>Web Interface Must be launched by running Pronterface!</b>" index.exposed = True def KillWebInterfaceThread(): cherrypy.engine.exit() def StartWebInterfaceThread(webInterface): current_dir = os.path.dirname(os.path.abspath(__file__)) cherrypy.config.update({'engine.autoreload_on':False}) cherrypy.config.update(configfile(webInterface.pface.web_config or "http.config")) conf = {'/css/style.css': {'tools.staticfile.on': True, 'tools.staticfile.filename': sharedfile('css/style.css'), }, '/images/control_xy.png': {'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_xy.png'), }, '/images/control_z.png': {'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_z.png'), }} cherrypy.config.update(configfile(webInterface.pface.web_config or "http.config")) cherrypy.quickstart(webInterface, '/', config = conf) if __name__ == '__main__': cherrypy.config.update(configfile("http.config")) cherrypy.quickstart(WebInterfaceStub())
gWeblog = re.sub("\n", "</br>", gWeblog)+log index.exposed = True class WebInterfaceStub(object): def index(self): return "<b>Web Interface Must be launched by running Pronterface!</b>" index.exposed = True def KillWebInterfaceThread(): cherrypy.engine.exit() def StartWebInterfaceThread(webInterface): current_dir = os.path.dirname(os.path.abspath(__file__)) cherrypy.config.update({'engine.autoreload_on':False}) cherrypy.config.update(configfile(webInterface.pface.web_config or "http.config" or "/etc/printrun/http.config")) conf = {'/css/style.css': {'tools.staticfile.on': True, 'tools.staticfile.filename': sharedfile('css/style.css'), }, '/images/control_xy.png': {'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_xy.png'), }, '/images/control_z.png': {'tools.staticfile.on': True, 'tools.staticfile.filename': imagefile('control_z.png'), }} cherrypy.config.update(configfile(webInterface.pface.web_config or "http.config" or "/etc/printrun/http.config")) cherrypy.quickstart(webInterface, '/', config = conf) if __name__ == '__main__': cherrypy.config.update(configfile("/etc/printrun/http.config")) cherrypy.quickstart(WebInterfaceStub())