This question shows research effort; it is useful and clear
1
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我正在尝试使用ntpath.basename()像/Users/user/file_one和 get一样的字符串file_one。但是,我遇到了问题ntpath。它在我运行脚本时有效,但在我 py2app 之后,ntpath 不再有效。ntpath 有替代方案吗?我不确定它对 Windows 有什么特殊功能,但我的脚本是为 OS X 构建的,因此只使用正斜杠,所以如果没有 ntpath 提供的“NT 魔法”,我应该没问题。