标签 python file
<分区>
Possible Duplicate: python, path of script
有什么方法可以打印文件的自身文件名和当前位置。
最佳答案
__file__ 会是您要查找的内容吗?
__file__
关于python - 如何获取自己的文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4801597/
相关文章:
python - SConscript 和 SConstruct 文件之间的区别?
file - 我如何存储可以在Delphi中运行时更改的文件路径
c - 如何从输入文件中提取信息并将它们放入 C 数组中?
python - 如何干净地退出多处理脚本?
python - 发送附件 'file'时Django 1.5错误对象没有属性 '__getitem__'
python - 通过pyodbc在SQL查询中指定列条件会导致错误
git - 在 git 存储库中高效存储二进制文件
python - 对 argparse 感到困惑
java - 为什么对Path的操作要以静态方法的形式实现呢?
php - file_get_contents 和 file_put_contents 的 FTP 超时