- Products -


Software


NEWS


Special



- Knowledge -


Category × Tag



- Like -

公開
作成日:2021/10/7
更新日:2022/3/4

【Python】実行中のファイルパスを取得する



#ファイル名を表示
print(__file__)

#ファイルパスを表示
print(os.path.realpath(__file__))
print(os.path.abspath(__file__))



https://codechacha.com/ja/python-examples-get-working-directory/


Category



Tag




関連記事


{{tmp.name}}

{{article.category}} {{article.title}}