Added functions to check OS/Platform

This commit is contained in:
Lakshay Kalbhor 2017-09-16 19:23:05 +05:30
parent bcb486379a
commit c5ceb6b880

View File

@ -856,3 +856,18 @@ def expand_windows_drive(path):
return path + "\\"
else:
return path
def is_mac():
if sys.platform == 'darwin':
return True
return False
def is_linux():
if sys.platform == 'linux' or sys.platform == 'linux2':
return True
return False
def is_windows():
if sys.platform.startswith('win'):
return True
return False