Added functions to check OS/Platform
This commit is contained in:
parent
bcb486379a
commit
c5ceb6b880
@ -856,3 +856,18 @@ def expand_windows_drive(path):
|
|||||||
return path + "\\"
|
return path + "\\"
|
||||||
else:
|
else:
|
||||||
return path
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user