scriptName = sys.argv[0].split("\\")[-1][0:-3] #the script without the .py extension dateTimeStamp = time.strftime('%Y%m%d%H%M%S') #in the format YYYYMMDDHHMMSS userName = string.lower(os.environ.get("USERNAME")) logFile = rootDir + "\\" + scriptName + "_" + userName + "_" + dateTimeStamp + ".log"
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.