直接看代码
Python代码
- import os
- print os.path.dirname(os.path.realpath(__file__))
很多时候会用到这个
Submitted by BB on 2009-12-06, 18:12:06. Python
直接看代码
很多时候会用到这个
thanks, it's helpful
Post by protagonsit on 2010-01-06, 14:01:57
#1
__file__ 应该是 "__file__" 字符串 形式....
Post by 飞 on 2010-05-10, 13:05:57
#2
恩 学习了
http://www.00857.cn
Post by 天津西站医院 on 2010-08-09, 14:08:02
#3