root/galaxy-central/scripts/check_python.py

リビジョン 2, 0.7 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1import os, sys
2
3msg = """ERROR: Your Python version is: %s
4Galaxy is currently supported on Python 2.4, 2.5 and 2.6.  To run Galaxy,
5please download and install a supported version from python.org.  If a
6supported version is installed but is not your default, getgalaxy.org
7contains instructions on how to force Galaxy to use a different version.""" % sys.version[:3]
8
9def check_python():
10    try:
11        assert sys.version_info[:2] >= ( 2, 4 ) and sys.version_info[:2] <= ( 2, 6 )
12    except AssertionError:
13        print >>sys.stderr, msg
14        raise
15
16if __name__ == '__main__':
17    rval = 0
18    try:
19        check_python()
20    except StandardError:
21        rval = 1
22    sys.exit( rval )
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。