示例#1
0
import main.app as app
import utils.args as a

args = a.Args('Battle of Snakes', scale=1)
app.launch(args)
示例#2
0
                         'platformer2')
_save_path_requires_subpaths = ['log']
for sprs in _save_path_requires_subpaths:
    try:
        os.makedirs(os.path.join(save_path, sprs))
    except FileExistsError:
        pass

# Prepare path
if getattr(sys, 'frozen', False):
    import time
    t = time.time_ns()

    path = sys._MEIPASS

    sys.stdout = open(os.path.join(save_path, 'log', f'{t}.log'), 'w')
    sys.stderr = sys.stdout

else:
    path = os.path.dirname(__file__)

# Create args
args = a.Args(scale=1, path=path, save_path=save_path)

# Load settings
settings.default_try_get_delim = '.'
settings.load(path=os.path.join(save_path, 'settings.json'),
              default_path=os.path.join(path, 'src', 'default_settings.json'))

app.launch(args)
示例#3
0
文件: app.py 项目: idafensp/NLP4Types
        logger.error('Exiting')
        return

    logger.info("Got id=%s, feedback=%s, _debug=%s" %
                (feed_id, _debug['feedback'], _debug))

    # empty feed id -> error
    if not feed_id:
        return "error"

    return "success"


if __name__ == "__main__":

    ps = uarg.Args()
    args = ps.get_args()

    logfile = 'log_flask.log'
    if args.log:
        logfile = args.log

    import logging.config
    logging.basicConfig(filename=logfile,
                        format='%(asctime)s %(levelname)s %(message)s',
                        level=logger.DEBUG)

    file_classifier = args.classifier
    file_vectorizer = args.vect

    # un-pickle classifier
示例#4
0
def launch(args=a.Args()):
    app = App(f.FrontEnd(args), b.BackEnd(args), args)
    app.prepare()
    app.run()
示例#5
0
import main.app as app
import utils.args as a

args = a.Args(scale=1)
app.launch(args)
示例#6
0
def launch(args=None):
    args = a.Args('Game') if args is None else args
    app = App(f.FrontEnd(args), b.BackEnd(args), args)
    app.prepare()
    app.run()