os.path.dirname(__file__) # スクリプトのあるディレクトリへの相対パス
os.path.join(os.path.dirname(__file__), 'input.txt') # スクリプトと同じディレクトリのファイル
os.path.basename(__file__) # スクリプト名
os.path.abspath(__file__) # スクリプトの絶対パス
os.path.abspath(os.path.dirname(__file__)) # スクリプトあるディレクトリの絶対パス
os.getcwd() # 実行時カレントディレクトリの絶対パス
これ把握してたらいいのかな?