1.取当前脚本所在路径 os.path.realpath(__file__).lstrip(sys.argv[0]) 转载于:https://www.cnblogs.com/lhbssc/archive/2012/05/11/2496297.html