def main(): # The App app = App(__package__) # Set theme app.theme = Cyberpunk() # Set view app.view = MainView(app) # Center the window app.center() # Lift off ! app.start()
from pyrustic.app import App import about import sys import os.path from tool.runtest.misc.builder import MainViewBuilder from tool.runtest.theme import RUNTEST_THEME app = App() app.root.title("Pyrustic Test Runner") app.theme = RUNTEST_THEME app.config = os.path.join(about.ROOT_DIR, "tool", "runtest", "config.ini") app.view = MainViewBuilder().build(app.root) app.start()
from pyrustic.app import App import about import os.path from tool.sqluna.misc.builder import MainViewBuilder from tool.sqluna.theme import SQLUNA_THEME app = App() app.root.title("Pyrustic Database Editor") app.theme = SQLUNA_THEME app.config = os.path.join(about.ROOT_DIR, "tool", "sqluna", "config.ini") app.view = MainViewBuilder().build(app) app.start()
# 'main.py' generated by Pyrustic Manager import about from pyrustic.app import App import os.path app = App() # Set window title window_title = "{} | Built with Pyrustic".format(about.PROJECT_NAME) app.root.title(window_title) # Set config config_file = os.path.join(about.ROOT_DIR, "config.ini") app.config = config_file if os.path.exists(config_file) else None # Set theme app.theme = None # feel free to use pyrustic.themes.darkmatter.DARKMATTER_THEME # Set view app.view = None # please assign a View's instance to this property # Lift off ! app.start()