Nick Coghlan wrote: > For example, a file not existing, a file being locked by another > process, and the user not having write permissions to the file are > problems that demand very different responses from the user. You can display an error-specific message without having to inspect the error code, e.g. try: something_with_file(path) except EnvironmentError, e: report_error("Couldn't do that with %s: %s" % (path, e)) This is a pattern I use a lot, and it seems to work pretty well. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4