Force the input path to be a directory.
Paths are normalized, and then it is ensured that the path ends with a /.
Converts /some//path/here to /some/path/here/ and /some//path/here// to /some/path/here/
Warn if the file path does or does not exist.
Parameters: |
|
---|
Convert semi-abstract-methods into raisers for NotImplementedErrors
>>> @semiabstractmethod
... def myfunc():
... print "Inside myfunc"
>>> myfunc()
NotImplementedError
Mark a method as deprecated.
Parameters: |
|
---|
The final DepricationWarning message is formatted as follows:
"Method {method} will be depricated in version {version}, please use {replacement} instead."
Setting the message argument replaces the string "Method {method} will be depricated".
Get the line number of a function. First looks for compat_co_firstlineno, then func_code.co_first_lineno.
Return a function which checks if an object can be cast as a given type. Basic usage allows for checking string-casting to a specific type.
Parameters: | ttype – Usually a type but really, any function which takes one argument and which will raise a ValueError if that one argument can’t be cast correctly. |
---|
Ask a yes/no question via raw_input() and return their answer.
Parameters: |
|
---|---|
Returns: | True or False for “yes” or “no” respectively. |
Ask a question via raw_input, and return the answer as a string.
Parameters: |
|
---|---|
Returns: | A string with the user’s answer or the default if no answer. |
A simple CLI UI to let the user choose an item from a list of items.
Parameters: |
|
---|