Skip to content

Instantly share code, notes, and snippets.

@sentenza
Created February 3, 2014 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sentenza/8786601 to your computer and use it in GitHub Desktop.
Save sentenza/8786601 to your computer and use it in GitHub Desktop.
Implementing verbose print in a Python script -- http://stackoverflow.com/a/5980173/1977778
if verbose:
def verboseprint(*args):
# Print each argument separately so caller doesn't need to
# stuff everything to be printed into a single string
for arg in args:
print arg,
print
else:
verboseprint = lambda *a: None # do-nothing function
@sentenza
Copy link
Author

sentenza commented Feb 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment