How to get the script path in Python.
get-script-path.py
import os, json, datetime #Script path BASE_DIR = os.path.dirname(__file__) #Specifying the data file DATA_FILE = BASE_DIR + '/data.txt'
Recommended Posts