2009-01-07 self_path Python 実行したスクリプトそれ自身の絶対パスを返す関数. from sys import argv from os.path import dirname, abspath def self_path(): return abspath(dirname(argv[0]))