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'

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.dev0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

pythonfinder-0.0.1.dev0-py2.py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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