Created
April 20, 2020 07:24
-
-
Save DalyaG/5f653c8ce1edcbf583c2f135d05afd8c to your computer and use it in GitHub Desktop.
generate log folder
This file contains 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 | |
from datetime import datetime | |
start_time_str = datetime.today().strftime('%d_%m_%Y__%H_%M_%S') | |
log_dir = f"log_{start_time_str}" | |
os.mkdir(log_dir) | |
# This will generate a folder named something like log_14_04_2020__19_46_06 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment