Skip to content
A module to improve "file/command not found" error messages with "did you mean" suggestions.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Corrected doc typo Jul 2, 2015
pydidyoumean Update setup.py to pull version info from source code Nov 7, 2015
tests
.gitignore
AUTHORS.txt Initial add of unit tests and docs and misc files. Jul 1, 2015
CHANGES.txt
LICENSE.txt
MANIFEST.in Initial add of unit tests and docs and misc files. Jul 1, 2015
README.md
setup.py

README.md

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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.