2008-12-31, 18:03
Is there a python function/variable to retrieve which platform/OS (XBOX, Win, Mac, Linux) a script or plugin is running on?
Thanks.
Rodejo
Thanks.
Rodejo
rodejo16 Wrote:Is there a python function/variable to retrieve which platform/OS (XBOX, Win, Mac, Linux) a script or plugin is running on?
Thanks.
Rodejo
import xbmc
def get_system_platform():
"""
get platform on which xbmc run
"""
platform = "unknown"
if xbmc.getCondVisibility( "system.platform.linux" ):
platform = "linux"
elif xbmc.getCondVisibility( "system.platform.xbox" ):
platform = "xbox"
elif xbmc.getCondVisibility( "system.platform.windows" ):
platform = "windows"
elif xbmc.getCondVisibility( "system.platform.osx" ):
platform = "osx"
print "Platform: %s"%platform
return platform
if get_system_platform() == "osx":
print "Platform is MAC OSX"