summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2009-07-29 21:59:52 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2009-07-29 21:59:52 +0000
commit5dba4687d20ab78d1f80dfbfe03a1181fb30261d (patch)
treea82b046d99e90e463a80390e86c529eabcf37e25 /examples
parentcdc75aed09a15c9eaf175896132dbb95e9e75ba1 (diff)
downloadpyserial-5dba4687d20ab78d1f80dfbfe03a1181fb30261d.tar.gz
add a notice when run with old Python
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@258 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'examples')
-rw-r--r--examples/test_iolib.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/test_iolib.py b/examples/test_iolib.py
index 2f6cd4b..e740a4c 100644
--- a/examples/test_iolib.py
+++ b/examples/test_iolib.py
@@ -27,6 +27,16 @@ On a 9 pole DSUB these are the pins (2-3) (4-6) (7-8)
import unittest
import sys
+
+if sys.version_info < (2, 6):
+ sys.stderr.write("""\
+==============================================================================
+WARNING: this test is intended for Python 2.6 and newer where the io library
+is available. This seems to be an older version of Python running.
+Continuing anyway...
+==============================================================================
+""")
+
import io
import serial