Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

shutil.which for those not using Python 3.3 yet.

Project description

A copy & paste backport of Python 3.3’s shutil.which function.

Usage

First, install the package: pip install shutilwhich

Importing the package:

import shutilwhich

will monkey-patch the shutil package, so from that point on you can simply import the which function:

from shutil import which

To keep things a little more concise, you can also import which directly from shutilwhich:

from shutilwhich import which

This will still monkeypatch the shutil module. On Python 3.3 and above, the module never do anything but return the stdlib shutil.which function.

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
shutilwhich-1.1.0.tar.gz (2.3 kB) Copy SHA256 hash SHA256 Source None Apr 25, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page