diff options
Diffstat (limited to 'examples/bluetooth/heartrate_game/heartrate_global.py')
-rw-r--r-- | examples/bluetooth/heartrate_game/heartrate_global.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/bluetooth/heartrate_game/heartrate_global.py b/examples/bluetooth/heartrate_game/heartrate_global.py index 584c44d21..de5c37ac3 100644 --- a/examples/bluetooth/heartrate_game/heartrate_global.py +++ b/examples/bluetooth/heartrate_game/heartrate_global.py @@ -1,7 +1,7 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import os - +import sys _simulator = False @@ -17,3 +17,14 @@ def set_simulator(s): is_android = os.environ.get('ANDROID_ARGUMENT') + + +def error_not_nuitka(): + """Errors and exits for macOS if run in interpreted mode. + """ + is_nuitka = "__compiled__" in globals() + if not is_nuitka and sys.platform == "darwin": + print("This example does not work on macOS when Python is run in interpreted mode." + "For this example to work on macOS, package the example using pyside6-deploy" + "For more information, read `Notes for Developer` in the documentation") + sys.exit(0) |