This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.path | |
# https://docs.python.org/2/library/functions.html#raw_input | |
report = raw_input("Please enter report location: ").strip() | |
# You can't always begin your programming flow with the | |
# input user has provided. It is better to check user input. | |
# In this case here is one useful check | |
if not os.path.isfile(report): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
# Read this | |
# https://docs.python.org/2/library/sys.html#sys.argv | |
# you can use | |
report = sys.argv[1] | |
# this way first argument that is passed | |
# to the script will be report location | |
# If you are further instersted you can use |
NewerOlder