blob: ed058484a5ceddba0ef8389914152be8839507a2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import sys
import platform
WINDOWS = platform.system().lower() == "windows"
PY2 = sys.version_info.major < 3
def check_Windows():
current_platform = platform.system()
if not WINDOWS:
raise RuntimeError("available only for Windows, not {}.".format(current_platform))
def check_PY2():
if not PY2:
raise RuntimeError("needed only in Python 2")
|