def start(self): import __builtin__ # set the gettext translation __builtin__._ = lambda x: x web = WebServer(pysetup=self) web.start() error = web.check_error() # TODO: start cli in this case if error: #todo errno 44 port already in use print error url = "http://%s:%d/" % (socket.gethostbyname( socket.gethostname()), web.port) print "Setup is running at %s" % url opened = webbrowser.open_new_tab(url) if not opened: print "Please point your browser to the url above." cli = self.ask("Use commandline for configuration instead?", self.no, bool=True) if cli: print "Not implemented yet!" print "Use web configuration or config files" raw_input() return True
def start(self): web = WebServer(pysetup=self) web.start() error = web.check_error() if error: #todo errno 44 port already in use print error url = "http://%s:%d/" % (socket.gethostbyname( socket.gethostname()), web.port) print "Setup is started" opened = webbrowser.open_new_tab(url) if not opened: print "Please point your browser to %s" % url self.ask_lang() print "" print _("Would you like to configure pyLoad via Webinterface?") print _("You need a Browser and a connection to this PC for it.") print _("Url would be: http://hostname:8000/") viaweb = self.ask(_("Start initial webinterface for configuration?"), self.yes, bool=True) if viaweb: self.start_web() else: self.start_cli()
def start(self): import __builtin__ # set the gettext translation __builtin__._ = lambda x: x web = WebServer(pysetup=self) web.start() error = web.check_error() # TODO: start cli in this case if error: #todo errno 44 port already in use print error url = "http://%s:%d/" % (socket.gethostbyname(socket.gethostname()), web.port) print "Setup is running at %s" % url opened = webbrowser.open_new_tab(url) if not opened: print "Please point your browser to the url above." cli = self.ask("Use commandline for configuration instead?", self.no, bool=True) if cli: print "Not implemented yet!" print "Use web configuration or config files" raw_input() return True
def start(self): web = WebServer(pysetup=self) web.start() error = web.check_error() if error: #todo errno 44 port already in use print error url = "http://%s:%d/" % (socket.gethostbyname(socket.gethostname()), web.port) print "Setup is started" opened = webbrowser.open_new_tab(url) if not opened: print "Please point your browser to %s" % url self.ask_lang() print "" print _("Would you like to configure pyLoad via Webinterface?") print _("You need a Browser and a connection to this PC for it.") print _("Url would be: http://hostname:8000/") viaweb = self.ask(_("Start initial webinterface for configuration?"), self.yes, bool=True) if viaweb: self.start_web() else: self.start_cli()