path

Create log file in the directory of the script in Python

__file__ is the script file itself. From python3.9 above, it is an absolute path, otherwise the path passed by command…

3 years ago