summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blessings/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/blessings/__init__.py b/blessings/__init__.py
index 67bbddb..33b5cdc 100644
--- a/blessings/__init__.py
+++ b/blessings/__init__.py
@@ -10,11 +10,17 @@ except ImportError:
pass
import os
from os import isatty, environ
+from platform import python_version_tuple
import struct
import sys
from termios import TIOCGWINSZ
+if ('3', '0', '0') <= python_version_tuple() < ('3', '2', '2+'): # Good till 3.2.10
+ # Python 3.x < 3.2.3 has a bug in which tparm() erroneously takes a string.
+ raise ImportError('Blessings needs Python 3.2.3 or greater for Python 3 support due to http://bugs.python.org/issue10570.')
+
+
__all__ = ['Terminal']