Fix Python – How to implement the –verbose or -v option into a script?
I know the –verbose or -v from several tools and I’d like to implement this into some of my own scripts and tools.
I thought of placing:
if verbose:
print …
through my source code, so that if a user passes the -v option, the variable verbose will be set to True and the text will be printed.
Is this the right approach or is there a more com….