当前位置:网站首页>Common usage of OS (picture example)
Common usage of OS (picture example)
2022-06-23 13:28:00 【365JHWZGo】
List of articles
subject
OS Common usage of
function
Sketch Map
The following examples are shown based on this 
Guide library
First, you need to import the corresponding library
import os
os.listdir(path)
meaning : Directory structure under the current path , Do not display secondary directories
path: route
| Value | meaning |
|---|---|
| “.” | Current directory |
| “./path” | Specific catalogue |


os.path.abspath(path)
meaning : Current absolute path
path: route 
os.getcwd()
meaning : current path

os.path.dirname(path)
meaning : The parent path of the current path

边栏推荐
- Gary Marcus wrote: three perspectives from linguists that AI researchers need to know
- How to use androd gradle module dependency replacement
- R语言使用构建有序多分类逻辑回归模型、ordinal.or.display函数获取有序逻辑回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)、汇总统计结果保存到csv
- When did the redo log under InnoDB in mysql start to perform check point disk dropping?
- Esp32-c3 introductory tutorial problems ⑧ - blufi_ example. c:244: undefined reference to `esp_ ble_ gap_ start_ advertising
- 1 channel 100m optical fiber transceiver 1 100m optical 1 100m electric desktop Ethernet optical fiber transceiver built-in power supply
- #云原生征文#深入了解Ingress
- Hanyuan high tech USB3.0 optical transceiver USB industrial touch screen optical transceiver USB3.0 optical fiber extender USB3.0 optical fiber transmitter
- 那些技术实战中的架构设计方法
- Synergetic process
猜你喜欢

2 万字 + 30 张图 |MySQL 日志:undo log、redo log、binlog 有什么用?

Hanyuan hi tech 8-way telephone +1-way 100M Ethernet RJ11 telephone optical transceiver 8-way PCM telephone optical transceiver
![[deeply understand tcapulusdb technology] transaction execution of document acceptance](/img/d9/f6735906a130834c4b3e28de2b2617.png)
[deeply understand tcapulusdb technology] transaction execution of document acceptance

How to test the third-party payment interface?

4-way telephone +1-way Gigabit Ethernet 4-way PCM telephone optical transceiver

Go write permissions to file writefile (FileName, data, 0644)?

Analyse et résolution des défaillances de connexion causées par MySQL utilisant replicationconnection

Architecture design methods in technical practice

The two 985 universities share the same president! School: true

HomeKit支持matter协议,这背后将寓意着什么?
随机推荐
Go写文件的权限 WriteFile(filename, data, 0644)?
Esp32-c3 introductory tutorial problem ⑦ - fatal error: ESP_ Bt.h: no such file or directory ESP not found_ bt.h
Restcloud ETL resolves shell script parameterization
20000 words + 30 pictures | MySQL log: what is the use of undo log, redo log and binlog?
What is the reason why maxcompute is sometimes particularly slow to execute SQL queries
C # learning (advanced course) day15 - exception handling and namespace
R语言使用MASS包的polr函数构建有序多分类logistic回归模型、使用exp函数和coef函数获取模型中每个变量(自变量改变一个单位)对应的优势比(odds ratio)
美国的国家公园概览
How to test the third-party payment interface?
Tuikit audio and video low code solution navigation page
Unity learning day14 -- collaboration and WWW
互联网技术发展内卷后的出路——iVX的诞生
Part C - value types and reference types
C # learning (advanced course) day13 - Reflection
首次曝光!唯一全域最高等级背后的阿里云云原生安全全景图
R language uses the multinom function of NNET package to build a disordered multi classification logistic regression model, uses regression coefficients and their standard errors to calculate the valu
Quickly understand the commonly used asymmetric encryption algorithm, and no longer have to worry about the interviewer's thorough inquiry
在线文本过滤小于指定长度工具
Overview of national parks in the United States
64 channel PCM telephone optical transceiver 64 channel telephone +2-channel 100M Ethernet telephone optical transceiver 64 channel telephone PCM voice optical transceiver