may,use like this
dir1:
file1.py
dir2:
file2.py
file2.py:
import file1
python dir2/file2.py
you will got: ERROR,ERROR,ERROR ...
file2.py
if __name__ == '__main__':
import smart_append_path
smart_append_path.append_top1(__file__)