split class name and print out with spaces

This commit is contained in:
2024-04-17 20:09:34 +02:00
parent 9103e3e139
commit 4620ee31eb
+2 -2
View File
@@ -6,7 +6,7 @@ from server.SnakeBuilder import SnakeBuilder
from datetime import datetime
from flask import Flask
from flask import request
import logging, json, os
import logging, json, os, re
class Server:
default_snake_config = {"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}
@@ -57,7 +57,7 @@ class Server:
def run(self, host:str="0.0.0.0", port:str="8000", debug:bool=False):
logging.getLogger("werkzeug").setLevel(logging.ERROR)
print(f"\nRunning Battlesnake at http://{host}:{port} with the {self.snake_type.replace('Snake', '')} Snake")
print(f"\nRunning Battlesnake at http://{host}:{port} with the {' '.join(re.findall('[A-Z][^A-Z]*', self.snake_type))}")
self.app.run(host=host, port=port, debug=debug)
def _read_json_config_or_create(self):