Articles
288
Tags
201
Categories
0
karr's blog
Search
python 通过 os 更改代码运行目录
Created
2024-05-23
|
Updated
2025-02-19
|
Post Views:
2
python
1
2
3
import
os
os.chdir(
"../"
)
# 修改当前工作目录
print
(os.getcwd())
# 获取当前工作目录
Author:
karr
Link:
https://bitterteaer.github.io/python-%E9%80%9A%E8%BF%87-os-%E6%9B%B4%E6%94%B9%E4%BB%A3%E7%A0%81%E8%BF%90%E8%A1%8C%E7%9B%AE%E5%BD%95/
Copyright Notice:
All articles in this blog are licensed under
CC BY-NC-SA 4.0
unless stating additionally.
python
os
chdir
微信扫一扫:分享
微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
Previous
通过 dockerfile 部署 opencv-python 相关时候需要引入的依赖库
Next
Chrome浏览器中使用JavaScript自动下拉刷新页面
Related Articles
2024-07-24
StopIteration 异常标志着协程的结束
2024-07-24
io多路复用与python协程asyncio的关系
2024-10-08
pip-compile & requirements.in
2024-09-21
python: memory_profiler包,记录代码内存使用情况,查找内存泄漏原因
2025-01-07
python re.search
2024-07-21
python 协程详解
karr
世界那么大,我想去看看。
Articles
288
Tags
201
Categories
0
gitee
Announcement
This is my Blog
Recent Post
Git报错: Failed to connect to github.com port 443 解决方案
2025-03-30
AI Agent 系统架构图
2025-03-28
固定整个页面只有100%的高度,不能进行下拉,当组件的内容超过100%时候在个自组件内部加上滚动条
2025-03-12
html保证背景色铺满整个页面
2025-03-12
importlib.import_module强制从文件加载
2025-03-07
Search
Loading the Database