Browse Source

refuse to run with python < 2.5.0

Matthew Wang 11 years ago
parent
commit
c8734e4e35
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/cdiff.py

+ 5
- 0
src/cdiff.py View File

@@ -9,6 +9,11 @@ See demo at homepage: https://github.com/ymattw/cdiff
9 9
 """
10 10
 
11 11
 import sys
12
+
13
+if sys.hexversion < 0x02050000:
14
+    sys.stderr.write("ERROR: requires python >= 2.5.0\n")
15
+    sys.exit(1)
16
+
12 17
 import os
13 18
 import re
14 19
 import difflib