from abc import ABCMeta, abstractmethod
from .utils import WebSocket

import json
import os
from browser import timer, html, document
from datetime import datetime
from functools import wraps
from .utils import LocalInterpreter

import random

RadiantServer = None


########################################################################
class RadiantAPI():
    """"""

    # ----------------------------------------------------------------------
    def __init__(self, class_, python=None):
        """"""
        if python and python[1] != 'None':
            setattr(self, python[1], LocalInterpreter())
            # print('OK' * 100)
            # print(python[1], self.MyClass)

    # ----------------------------------------------------------------------
    def add_stylesheet(self, file):
        """"""
        document.select('head')[0] <= html.LINK(
            href=os.path.join('root', file), type='text/css', rel='stylesheet')

