Back to [Home]
There is a new way to load Apps DYNAMICALLY (from a json file right now.)
Look at the [NEW_MAIN_EXAMPLE] for that.
You can do it the old way, too.
All below (even the link at the end) belongs to the old way of doing it.
The main script which you start with python.
If you want a more detailed example, view the [Complex Main Example]
import APP_BASE # this one is mandatory
# ...
# Import your Apps here and register them:
import importedApp
# Do that at the end of your Application File with its file name as name.
# It's just here for reference.
APP_BASE.registerApplication("importedAppName", importedApp.App())
# ...
# Then set the current running application:
APP_BASE.setCurrentApp("importedAppName")`
# And set the underlying ("system") App, which gets called when you "exit" another app:
# This one can be ommited if you just use one app.
APP_BASE.underlyingApp = "importedAppName"`
# Finally, initialize the system and run it:
APP_BASE.initialize()
running = True
while running:
running=APP_BASE.update()
APP_BASE.quit()
View the [Complex Main Example] for a more complex app infrastructure.
If you know how MAIN.py works now, learn how to create one of these shiny Apps for yourself with the [APP_TEMPLATE].
Or go back [Home]
Wiki: APP_BASE
Wiki: APP_TEMPLATE
Wiki: Complex Main Example
Wiki: Home
Wiki: HowTo