每一次深入Python:
import sys, osprint 'sys.argv[0] =', sys.argv[0] 1pathname = os.path.dirname(sys.argv[0]) 2print 'path =', pathnameprint 'full path =', os.path.abspath(pathname)
欢迎分享,转载请注明来源:内存溢出
每一次深入Python:
import sys, osprint 'sys.argv[0] =', sys.argv[0] 1pathname = os.path.dirname(sys.argv[0]) 2print 'path =', pathnameprint 'full path =', os.path.abspath(pathname)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)