fHDHR_LocalNow/fHDHR_web/brython/brython_bry.py
deathbybandaid 12313bde74 first psuh
2021-01-15 13:52:25 -05:00

20 lines
487 B
Python

from flask import send_from_directory
import pathlib
class Brython_bry():
endpoints = ["/brython.bry"]
endpoint_name = "file_brython_bry"
def __init__(self, fhdhr):
self.fhdhr = fhdhr
self.brython_path = pathlib.Path(self.fhdhr.config.internal["paths"]["fHDHR_web_dir"]).joinpath('brython')
def __call__(self, *args):
return self.get(*args)
def get(self, *args):
return send_from_directory(self.brython_path, 'brython_code.py')