Skip to main content

Probe Python source code for language version.

Project description

======================
python version probe
======================

A tool for detecting the Python major version for a body of source
code.

Quickstart
==========

```
from version_probe import detect_version

# Find the version used in sources files under ~/projects/ipv7
v = detect_version("~/projects/ipv7")

# something so advanced is, of course, written in Python 3
assert v == 3

v = detect_version("/opt/old_project")
assert v == 2

try:
detect_version("~/projects/experimental")
except ValueError as e:
print("Syntax error detected in the experimental project: {}".format(e))
```

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for version_probe, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size version_probe-0.1.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page