>>926
ありがとなんかいいコード見つけたからとりあえず置いとく
if getattr(sys, 'frozen', False):
 # frozen
path = "__file__"
else:
# unfrozen
path = __file__