python version/setup
Added Python version checking, running as script on Python 3.0+ and the latest Python version configuration
This commit is contained in:
parent
c58ad3367b
commit
2148a4a5c3
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#! /usr/bin/python3
|
||||||
|
#! /usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright 2012 Matt Martz
|
# Copyright 2012 Matt Martz
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
|
@ -19,6 +20,12 @@ import os
|
||||||
import re
|
import re
|
||||||
import csv
|
import csv
|
||||||
import sys
|
import sys
|
||||||
|
if sys.version_info[0:2] < (2, 4):
|
||||||
|
raise Exception(
|
||||||
|
'You need Python 2.4+ to use speedtest!\n'
|
||||||
|
'Run \u001b[32m./setup.sh\u001b[0m '
|
||||||
|
'to install the newest Python version '
|
||||||
|
'or do it manually!')
|
||||||
import math
|
import math
|
||||||
import errno
|
import errno
|
||||||
import signal
|
import signal
|
||||||
|
|
Loading…
Reference in New Issue