Skip to main content

A cross-platform python discovery tool to help locate python on any system.

Project description

Installation

Install from PyPI:

$ pipenv install --pre pythonfinder

Install from Github:

$ pipenv install -e git+https://github.com/techalchemy/pythonfinder.git#egg=pythonfinder

Usage

Using PythonFinder is easy. Simply import it and ask for a python:

>>> from pythonfinder import PythonFinder
>>> PythonFinder.from_line('python3')
'/home/techalchemy/.pyenv/versions/3.6.5/python3'

>>> PythonFinder.from_version('2.7')
'/home/techalchemy/.pyenv/versions/2.7.14/python'

PythonFinder can even find beta releases!

>>> PythonFinder.from_version('3.7')
'/home/techalchemy/.pyenv/versions/3.7.0b1/bin/python'

Windows Support

PythonFinder natively supports windows via both the PATH environment variable and PEP-514 compliant finder which comes by default with python 3. Usage on windows becomes:

>>> PythonFinder.from_line('python')
"C:\\Program\\\\ Files\\Python36\\python.exe"

>>> PythonFinder.from_version('2.7')
"C:\\Python27\\python.exe"

>>> PythonFinder.from_line('py -3')
"C:\\Program\\\\ Files\\Python36\\python.exe"

Integrations

Project details


Download files

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

Source Distribution

pythonfinder-0.0.1.dev1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonfinder-0.0.1.dev1-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pythonfinder-0.0.1.dev1.tar.gz.

File metadata

File hashes

Hashes for pythonfinder-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 7067c934bcd9fe1f9268174baaff4581bc21b23e7950bb55ebcf43199184ed2f
MD5 4342470da46975143312b22e79cc1836
BLAKE2b-256 02cd45ca023fb4199cfb25055aed6281f99e98be197c2d1421f5a2e34987654b

See more details on using hashes here.

File details

Details for the file pythonfinder-0.0.1.dev1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pythonfinder-0.0.1.dev1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 69a94456397585b26c8b0e96fd82380a1a5d3da00cd9321041fdf727a558ee2c
MD5 85b96685b9bd81dcecaffc6f1f74fb9f
BLAKE2b-256 36dddde8fd8924555a6c4391256d7f975010612b64d54f8525bd82b2e8fc6d6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page