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:
Maksymilian Potok 2020-12-05 03:16:09 +01:00
parent c58ad3367b
commit 2148a4a5c3
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python
#! /usr/bin/python3
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012 Matt Martz
# All Rights Reserved.
@ -19,6 +20,12 @@ import os
import re
import csv
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 errno
import signal