<gh_stars>0
import os
from generators import Generators
from gui import Gui
from model import Model



if __name__ == '__main__':
    path = os.path.abspath(os.path.dirname(__file__))

    for index, model_name in enumerate(Generators.__all__):
        print(f'{index+1:<{4}} : {model_name}')
    
    try:
        choice = int(input('\n> '))

        if not 0 < choice < len(Generators.__all__)+1:
            exit(print('choice out of range'))

        model = Model(
            **getattr(Generators, Generators.__all__[choice-1])(),
            color=(255, 255, 255))

    except ValueError:
        print('choice must be an int')
    
    except KeyboardInterrupt:
        print('Keyboard interrupt')
    
    if 'model' not in locals():
        exit()


    gui = Gui(path)
    gui.add_model(model)
    gui.main_loop()
import os
from generators import Generators
from gui import Gui
from model import Model



if __name__ == '__main__':
    path = os.path.abspath(os.path.dirname(__file__))

    for index, model_name in enumerate(Generators.__all__):
        print(f'{index+1:<{4}} : {model_name}')
    
    try:
        choice = int(input('\n> '))

        if not 0 < choice < len(Generators.__all__)+1:
            exit(print('choice out of range'))

        model = Model(
            **getattr(Generators, Generators.__all__[choice-1])(),
            color=(255, 255, 255))

    except ValueError:
        print('choice must be an int')
    
    except KeyboardInterrupt:
        print('Keyboard interrupt')
    
    if 'model' not in locals():
        exit()


    gui = Gui(path)
    gui.add_model(model)
    gui.main_loop()