Also add utils.is_posix()

This commit is contained in:
Florian Bruhin 2017-09-20 10:08:54 +02:00
parent e50ab3f72c
commit 9ddc59e8e5

View File

@ -19,6 +19,7 @@
"""Other utilities which don't fit anywhere else."""
import os
import io
import re
import sys
@ -886,8 +887,14 @@ def yaml_dump(data, f=None):
def is_mac():
return sys.platform.startswith('darwin')
def is_linux():
return sys.platform.startswith('linux')
def is_windows():
return sys.platform.startswith('win')
def is_posix():
return os.name == 'posix'