(操作系统路径目录名(\uU文件\)在FreeBSD中不工作

2024-09-30 22:14:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我想设置到images dir的路径…在我的Django项目中…它工作得很好,但是当我在FreeBSD上运行脚本时,它就不工作了。。。在

import os 

imagesDirPath = (os.path.dirname(__file__)) + "/couponRestApiApp/stores/images/"
print imagesDirPath

output: /home/vaibhav/TRAC/coupon-rest-api/couponRestApi/couponRestApiApp/stores/images/

以上是我的系统,但当在freeBSD上试用时,我得到:

^{pr2}$

但应该是的

^{3}$

谁能告诉我怎么了。。。在


Tags: path项目djangoimport路径脚本osdir