Skip to main content

A module to improve "file/command not found" error messages with "did you mean" suggestions.

Project description

# PyDidYouMean

A module to improve “file/command not found” error messages with “did you mean” suggestions.

Install with:

pip install pydidyoumean

Typical usage:

if FILE_NOT_FOUND:

pydidyoumean.printFileSuggestion(FILENAME) # if no suggested file is found in the cwd, this prints nothing # prints out “Did you mean %s?n” % (SUGGESTED_FILENAME)

if COMMAND_NOT_FOUND:

pydidyoumean.printSuggestion(CMD_NAME, LIST_OF_ALL_CMDS) # if no suggested command is found, this prints nothing # prints out “Did you mean %s?n” % (SUGGESTED_CMD)

There are several other functions and optional parameters for customizing the message or getting the recommendations. Docs are at https://pydidyoumean.readthedocs.org

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

PyDidYouMean-0.1.1.zip (15.5 kB view details)

Uploaded Source

File details

Details for the file PyDidYouMean-0.1.1.zip.

File metadata

  • Download URL: PyDidYouMean-0.1.1.zip
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyDidYouMean-0.1.1.zip
Algorithm Hash digest
SHA256 d60f23b6ff00a254181662cd1c482d1f77235178c46938cd7ba5e40027fad624
MD5 1d9f7a9610b1a4518d3f8ffbc93479c2
BLAKE2b-256 982527f7b6596e4c0e5ead2e29f549d6eb7a3fd1d251dd642515212c4c85be90

See more details on using hashes here.

Provenance

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