Comment code of launching modes
This commit is contained in:
		@@ -669,14 +669,17 @@ def cli_app():
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    if 'REQUEST_URI' in os.environ:
 | 
			
		||||
        # mod_cgi
 | 
			
		||||
        wsgiref.handlers.CGIHandler().run(cgi_wrapper)
 | 
			
		||||
 | 
			
		||||
    elif len(sys.argv) <= 1:
 | 
			
		||||
        # start internal (basic) http server
 | 
			
		||||
        print('Serving http://localhost:%s/'%PORT)
 | 
			
		||||
        httpd = wsgiref.simple_server.make_server('', PORT, cgi_wrapper)
 | 
			
		||||
        httpd.serve_forever()
 | 
			
		||||
 | 
			
		||||
    else:
 | 
			
		||||
        # as a CLI app
 | 
			
		||||
        try:
 | 
			
		||||
            cli_app()
 | 
			
		||||
        except (KeyboardInterrupt, SystemExit):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user