Last active
October 22, 2020 20:19
-
-
Save vijinho/0bdad1fb2f5b399bc3ca to your computer and use it in GitHub Desktop.
Kivy - Detect if running on a desktop platform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.utils import platform | |
def is_desktop(): | |
""" | |
Detect if we are running on the desktop or not | |
:return: boolean True if running on a desktop platform or String platform | |
""" | |
if platform in ('linux', 'win', 'macosx'): | |
return True | |
else: | |
return p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'windows' is 'win' now
https://kivy.org/doc/stable/api-kivy.utils.html