Skip to content

Instantly share code, notes, and snippets.

@vijinho
Last active October 22, 2020 20:19
Show Gist options
  • Save vijinho/0bdad1fb2f5b399bc3ca to your computer and use it in GitHub Desktop.
Save vijinho/0bdad1fb2f5b399bc3ca to your computer and use it in GitHub Desktop.
Kivy - Detect if running on a desktop platform
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
@ciscoinfo
Copy link

@vijinho
Copy link
Author

vijinho commented Oct 22, 2020

'windows' is 'win' now
https://kivy.org/doc/stable/api-kivy.utils.html

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment