main.py 426 Bytes
Newer Older
1
2
3
4
5
import os


def main():
    # Try loading analog clock
6
7
8
9
10
    try:
        import config

        default_app = config.get_string("default_app")
    except OSError:
11
        default_app = "apps/g_watch/__init__.py"
12

13
14
15
16
17
18
19
20
21
22
23
24
    try:
        with open(default_app, "r"):
            pass

        print("main.py: Loading " + default_app)
        os.exec(default_app)
    finally:
        os.exit(1)


if __name__ == "__main__":
    main()