結論
以下で親ディレクトリのパスを出すことができるsample.py
import os
os.pardir
os.pathなんちゃらだと思ったらもっと簡単だった。
追記:実行ファイルそのもののフルパスを出したい時はもうすこし面倒だった
sample.py
dir_name = os.path.dirname(__file__)
file_name = os.path.basename(__file__)
full_path = os.path.join(dir_name, file_name)
追記2:実行ファイルの絶対パスならもっと簡単な方法があった
以下、sample.py
os.path.abspath(__file__)