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.

Files for PyDidYouMean, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size PyDidYouMean-0.1.3.tar.gz (12.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page