I want to add a debug print statement test, if I enable --verbose from the command line and if I have the following in the script.
logger.info("test")
I went through the following questions, but couldn’t get the answer…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to combine the wisdom of the Argparse Tutorial with Python’s Logging HOWTO. Here’s an example…
Run the help:
Running in verbose mode:
Running silently: