Also add utils.is_posix()
This commit is contained in:
parent
e50ab3f72c
commit
9ddc59e8e5
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
"""Other utilities which don't fit anywhere else."""
|
"""Other utilities which don't fit anywhere else."""
|
||||||
|
|
||||||
|
import os
|
||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
@ -886,8 +887,14 @@ def yaml_dump(data, f=None):
|
|||||||
def is_mac():
|
def is_mac():
|
||||||
return sys.platform.startswith('darwin')
|
return sys.platform.startswith('darwin')
|
||||||
|
|
||||||
|
|
||||||
def is_linux():
|
def is_linux():
|
||||||
return sys.platform.startswith('linux')
|
return sys.platform.startswith('linux')
|
||||||
|
|
||||||
|
|
||||||
def is_windows():
|
def is_windows():
|
||||||
return sys.platform.startswith('win')
|
return sys.platform.startswith('win')
|
||||||
|
|
||||||
|
|
||||||
|
def is_posix():
|
||||||
|
return os.name == 'posix'
|
||||||
|
Loading…
Reference in New Issue
Block a user