Easy solution is to set absolute path for script file and directory.
# Give absolute filepath and directory
import os
# getcwd gives where script called
# os.getcwd()
# Absolute path of script
abs_path_ = os.path.abspath(__file__)
# Directory where script is
dir_ = os.path.dirname(abs_path)
0 件のコメント:
コメントを投稿