This website requires JavaScript.
Explore
Help
Sign In
lzybetter
/
obsidian_sycn
Watch
1
Star
0
Fork
0
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
master
obsidian_sycn
/
知识管理
/
编程经验
/
Python
/
Python获取目录.md
T
Add File
New File
Upload File
Apply Patch
FNS Service
b8a78631a4
Update from Sync Service
2026-07-31 15:28:08 +08:00
174 B
Raw
Permalink
Blame
History
os.getcwd()获取的是目前python程序运行的目录;
想获取某个文件的完整目录可以使用__file__变量,但是这个变量仅在文件内有效;
Reference in New Issue
View Git Blame
Copy Permalink