3 """Test script to check required Python version.
5 Execute this code at the command line by typing:
7 python swc-installation-test-1.py
9 How to get a command line:
11 - On OSX run this with the Terminal application.
13 - On Windows, go to the Start menu, select 'Run' and type 'cmd'
14 (without the quotes) to run the 'cmd.exe' Windows Command Prompt.
16 - On Linux, either use your login shell directly, or run one of a
17 number of graphical terminals (e.g. 'xterm', 'gnome-terminal', ...).
19 For some screen shots, see:
21 http://software-carpentry.org/setup/terminal.html
23 Run the script and follow the instructions it prints at the end. If
24 you see an error saying that the 'python' command was not found, than
25 you may not have any version of Python installed. See:
27 http://www.python.org/download/releases/2.7.3/#download
29 for installation instructions.
31 This test is separate to avoid Python syntax errors parsing the more
32 elaborate `swc-installation-test-2.py`.
42 if _sys.version_info < (2, 6):
43 print('check for Python version (python):')
44 print('outdated version of Python: ' + _sys.version)
49 if __name__ == '__main__':
54 print('Install a current version of Python!')
55 print('http://www.python.org/download/releases/2.7.3/#download')