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.3.tar.gz (12.2 kB view details)

Uploaded Source

File details

Details for the file PyDidYouMean-0.1.3.tar.gz.

File metadata

  • Download URL: PyDidYouMean-0.1.3.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.1

File hashes

Hashes for PyDidYouMean-0.1.3.tar.gz
Algorithm Hash digest
SHA256 797861e20df143f42614d29cce3630b1051f34de599a0bf2fa318a60f8026cc4
MD5 b24c1f1c03981704b81b39736aff3ea9
BLAKE2b-256 091d7c958ca838bff8535d03fb5dcb3580f9c47920c22bdfb0fee5a50dd5a49d

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