浏览代码

refuse to run with python < 2.5.0

Matthew Wang 12 年前
父节点
当前提交
c8734e4e35
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      src/cdiff.py

+ 5
- 0
src/cdiff.py 查看文件

9
 """
9
 """
10
 
10
 
11
 import sys
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
 import os
17
 import os
13
 import re
18
 import re
14
 import difflib
19
 import difflib