## Python Version
This package provides a basic python version checking utility. It will check for a range of python versions and either report an error or exit depending on the parameters provided.
## Example
` $ python Python 3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3.1 20160330] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import python_version >>> >>> try: ... python_version.check(min=(3, 0, 0), max=(4, 0, 0)) ... except Exception as e: ... print(repr(e)) ... else: ... print("All good!") ... All good! >>> try: ... python_version.check(min=(3, 6, 0), max=(4, 0, 0)) ... except Exception as e: ... print(repr(e)) ... else: ... print("All good!") ... VersionConflict('requires python version >= 3.6.0 but the running python version is 3.5.1+',) >>> try: ... python_version.check(min=(2, 7, 0), max=(2, 7, 999)) ... except Exception as e: ... print(repr(e)) ... else: ... print("All good!") ... VersionConflict('requires python version <= 2.7.999 but the running python version is 3.5.1+',) >>> try: ... python_version.check(min=(2, 7, 0), max=(2, 7, 999), exit_on_error=True) ... except Exception as e: ... print(repr(e)) ... else: ... print("All good!") ... requires python version <= 2.7.999 but the running python version is 3.5.1+ $ `
Release files for python_version 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_version-0.0.2.tar.gz | 1.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_version-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 5.3 kB
Release files / python_version-0.0.2.tar.gz
| Download URL | python_version-0.0.2.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c16de57c7f2d614621cf468e8f5a20bb6b3cec665c9c7f5e9f9f000bf04fe67
|
|
BLAKE2b-256 checksum How to use checksums |
fe748ed1d7f895b33a89565be4b1c8651d503fcb2cdda951fef4ec6f6906432c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python_version-0.0.2-py2.py3-none-any.whl
| Download URL | python_version-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2c7429f3375cee19873892e5db4d10d2b42172d8851a8bb5111729e028470580
|
|
BLAKE2b-256 checksum How to use checksums |
a8e306841b7e2b5dab99f6e5ece60db926ce35b9cf351da87ecaf2d75e5d9009
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |