Skip to main content

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.

Source Distribution

shutilwhich-1.1.0.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file shutilwhich-1.1.0.tar.gz.

File metadata

  • Download URL: shutilwhich-1.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shutilwhich-1.1.0.tar.gz
Algorithm Hash digest
SHA256 db1f39c6461e42f630fa617bb8c79090f7711c9ca493e615e43d0610ecb64dc6
MD5 915947c5cdae7afd748ac715ee547adb
BLAKE2b-256 66be783f181594bb8bcfde174d6cd1e41956b986d0d8d337d535eb2555b92f8d

See more details on using hashes here.

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