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
de1dbe9777576dd41a698b1d8d37d3f16cfcd253
obsidian_sycn
/
知识管理
/
编程经验
/
Python
/
Python获取目录.md
T
FNS Service
b8a78631a4
Update from Sync Service
2026-07-31 15:28:08 +08:00
174 B
Raw
Blame
History
os.getcwd()获取的是目前python程序运行的目录;
想获取某个文件的完整目录可以使用__file__变量,但是这个变量仅在文件内有效;
Reference in New Issue
View Git Blame
Copy Permalink