Python os Module
This page shows the popular functions and classes defined in the
os module.
The items are ordered by their popularity in 40,000 open source Python projects.
If you can not find a good example below, you can try
the search function
to search modules.
-
1. makedirs()Used in 9744 projects
-
2. listdir()Used in 7552 projects
-
3. environ()Used in 7262 projects
-
4. remove()Used in 6449 projects
-
5. getcwd()Used in 4911 projects
-
6. mkdir()Used in 4743 projects
-
7. path()Used in 4307 projects
-
8. walk()Used in 3934 projects
-
9. system()Used in 3783 projects
-
10. getenv()Used in 2941 projects
-
11. chdir()Used in 2861 projects
-
12. unlink()Used in 2025 projects
-
13. stat()Used in 1972 projects
-
14. rename()Used in 1820 projects
-
15. sep()Used in 1600 projects
-
16. getpid()Used in 1512 projects
-
17. name()Used in 1510 projects
-
18. chmod()Used in 1221 projects
-
19. access()Used in 1202 projects
-
20. close()Used in 1110 projects
-
21. devnull()Used in 1093 projects
-
22. urandom()Used in 1076 projects
-
23. pathsep()Used in 851 projects
-
24. pardir()Used in 831 projects
-
25. kill()Used in 820 projects
-
26. popen()Used in 787 projects
-
27. rmdir()Used in 785 projects
-
28. symlink()Used in 682 projects
-
29. fdopen()Used in 649 projects
-
30. X_OKUsed in 597 projects
-
31. open()Used in 582 projects
-
32. _exit()Used in 579 projects
-
33. linesep()Used in 577 projects
-
34. getuid()Used in 525 projects
-
35. write()Used in 500 projects
-
36. curdir()Used in 494 projects
-
37. W_OKUsed in 493 projects
-
38. utime()Used in 443 projects
-
39. R_OKUsed in 428 projects
-
40. fork()Used in 427 projects
-
41. geteuid()Used in 414 projects
-
42. read()Used in 373 projects
-
43. O_CREATUsed in 355 projects
-
44. fstat()Used in 353 projects
-
45. readlink()Used in 345 projects
-
46. dup2()Used in 333 projects
-
47. uname()Used in 329 projects
-
48. setsid()Used in 327 projects
-
49. O_WRONLYUsed in 320 projects
-
50. SEEK_ENDUsed in 315 projects
-
51. umask()Used in 302 projects
-
52. O_RDWRUsed in 297 projects
-
53. waitpid()Used in 294 projects
-
54. O_RDONLYUsed in 281 projects
-
55. F_OKUsed in 280 projects
-
56. SEEK_SETUsed in 257 projects
-
57. pipe()Used in 233 projects
-
58. error()Used in 226 projects
-
59. O_NONBLOCKUsed in 220 projects
-
60. chown()Used in 218 projects
-
61. fsync()Used in 211 projects
-
62. strerror()Used in 211 projects
-
63. lstat()Used in 209 projects
-
64. scandir()Used in 204 projects
-
65. cpu_count()Used in 201 projects
-
66. link()Used in 197 projects
-
67. killpg()Used in 183 projects
-
68. SEEK_CURUsed in 181 projects
-
69. O_EXCLUsed in 169 projects
-
70. execv()Used in 162 projects
-
71. startfile()Used in 160 projects
-
72. defpath()Used in 156 projects
-
73. getgid()Used in 154 projects
-
74. dup()Used in 153 projects
-
75. WNOHANGUsed in 151 projects
-
76. removedirs()Used in 151 projects
-
77. mkfifo()Used in 149 projects
-
78. O_BINARYUsed in 147 projects
-
79. setuid()Used in 141 projects
-
80. sysconf()Used in 140 projects
-
81. WEXITSTATUSUsed in 136 projects
-
82. execvp()Used in 132 projects
-
83. statvfs()Used in 132 projects
-
84. O_TRUNCUsed in 132 projects
-
85. getcwdu()Used in 121 projects
-
86. altsep()Used in 120 projects
-
87. mknod()Used in 115 projects
-
88. WIFEXITEDUsed in 113 projects
-
89. getppid()Used in 109 projects
-
90. isatty()Used in 108 projects
-
91. WTERMSIGUsed in 107 projects
-
92. replace()Used in 106 projects
-
93. WIFSIGNALEDUsed in 102 projects
-
94. putenv()Used in 102 projects
-
95. extsep()Used in 100 projects
-
96. setgid()Used in 100 projects
-
97. fsencode()Used in 97 projects
-
98. PathLike()Used in 95 projects
-
99. fsdecode()Used in 94 projects
-
100. execl()Used in 84 projects
-
101. getlogin()Used in 83 projects
-
102. wait()Used in 82 projects
-
103. fspath()Used in 80 projects
-
104. __file__()Used in 79 projects
-
105. renames()Used in 76 projects
-
106. setpgrp()Used in 75 projects
-
107. makedev()Used in 74 projects
-
108. major()Used in 73 projects
-
109. minor()Used in 73 projects
-
110. execvpe()Used in 71 projects
-
111. lchown()Used in 70 projects
-
112. O_NOFOLLOWUsed in 69 projects
-
113. lseek()Used in 67 projects
-
114. getegid()Used in 61 projects
-
115. chflags()Used in 61 projects
-
116. execve()Used in 59 projects
-
117. _name()Used in 58 projects
-
118. O_APPENDUsed in 58 projects
-
119. popen2()Used in 56 projects
-
120. popen3()Used in 55 projects
-
121. popen4()Used in 55 projects
-
122. times()Used in 54 projects
-
123. spawnv()Used in 53 projects
-
124. expanduser()Used in 53 projects
-
125. setgroups()Used in 52 projects
-
126. get_terminal_size()Used in 51 projects
-
127. getpgid()Used in 49 projects
-
128. ftruncate()Used in 48 projects
-
129. execlp()Used in 47 projects
-
130. fchmod()Used in 47 projects
-
131. ttyname()Used in 44 projects
-
132. closerange()Used in 44 projects
-
133. getloadavg()Used in 40 projects
-
134. seteuid()Used in 39 projects
-
135. openpty()Used in 39 projects
-
136. spawn()Used in 38 projects
-
137. spawnvp()Used in 36 projects
-
138. stat_result()Used in 36 projects
-
139. WIFSTOPPEDUsed in 36 projects
-
140. sched_getaffinity()Used in 36 projects
-
141. exit()Used in 35 projects
-
142. spawnlp()Used in 34 projects
-
143. spawnl()Used in 33 projects
-
144. getpgrp()Used in 30 projects
-
145. getgroups()Used in 30 projects
-
146. O_TEMPORARYUsed in 30 projects
-
147. _get_exports_list()Used in 30 projects
-
148. html()Used in 30 projects
-
149. setegid()Used in 28 projects
-
150. nice()Used in 28 projects
-
151. unsetenv()Used in 28 projects
-
152. TMP_MAXUsed in 28 projects
-
153. lchmod()Used in 28 projects
-
154. setxattr()Used in 28 projects
-
155. tempnam()Used in 27 projects
-
156. chroot()Used in 27 projects
-
157. spawnlpe()Used in 27 projects
-
158. O_SYNCUsed in 23 projects
-
159. spawnve()Used in 22 projects
-
160. O_NOCTTYUsed in 22 projects
-
161. EX_OKUsed in 22 projects
-
162. abort()Used in 22 projects
-
163. set_inheritable()Used in 22 projects
-
164. forkpty()Used in 21 projects
-
165. getcwdb()Used in 21 projects
-
166. sendfile()Used in 21 projects
-
167. setreuid()Used in 20 projects
-
168. spawnvpe()Used in 20 projects
-
169. O_NOINHERITUsed in 20 projects
-
170. setpgid()Used in 19 projects
-
171. setregid()Used in 18 projects
-
172. fwalk()Used in 18 projects
-
173. terminal_size()Used in 18 projects
-
174. supports_fd()Used in 18 projects
-
175. getxattr()Used in 17 projects
-
176. O_NDELAYUsed in 16 projects
-
177. getsid()Used in 16 projects
-
178. wait4()Used in 16 projects
-
179. sysconf_names()Used in 15 projects
-
180. EX_SOFTWAREUsed in 15 projects
-
181. py()Used in 15 projects
-
182. O_LARGEFILEUsed in 14 projects
-
183. listxattr()Used in 14 projects
-
184. set_blocking()Used in 14 projects
-
185. WSTOPSIGUsed in 14 projects
-
186. P_WAITUsed in 13 projects
-
187. tmpnam()Used in 13 projects
-
188. tmpfile()Used in 13 projects
-
189. pathconf()Used in 13 projects
-
190. fpathconf()Used in 13 projects
-
191. initgroups()Used in 13 projects
-
192. fchown()Used in 13 projects
-
Used in 13 projects
-
194. supports_dir_fd()Used in 13 projects
-
195. O_TMPFILEUsed in 12 projects
-
196. statvfs_result()Used in 11 projects
-
197. execle()Used in 11 projects
-
198. mkdirs()Used in 11 projects
-
199. sync()Used in 11 projects
-
200. get_inheritable()Used in 11 projects
-
201. truncate()Used in 11 projects
-
202. wait3()Used in 11 projects
-
203. register_at_fork()Used in 11 projects
-
204. confstr()Used in 11 projects
-
205. stat_float_times()Used in 10 projects
-
206. tcsetpgrp()Used in 10 projects
-
207. fork1()Used in 10 projects
-
208. execlpe()Used in 10 projects
-
209. O_DIRECTORYUsed in 10 projects
-
210. ctermid()Used in 10 projects
-
211. lchflags()Used in 9 projects
-
212. DirEntry()Used in 9 projects
-
213. fchdir()Used in 9 projects
-
214. get_exec_path()Used in 9 projects
-
Used in 9 projects
-
Used in 9 projects
-
217. fstatvfs()Used in 9 projects
-
218. spawnle()Used in 8 projects
-
219. poll()Used in 8 projects
-
220. environb()Used in 8 projects
-
221. tcgetpgrp()Used in 8 projects
-
222. O_CLOEXECUsed in 8 projects
-
223. getenvb()Used in 8 projects
-
224. add_dll_directory()Used in 8 projects
-
225. P_NOWAITUsed in 7 projects
-
226. EX_USAGEUsed in 7 projects
-
227. exec()Used in 7 projects
-
228. _execvpe()Used in 7 projects
-
229. getpriority()Used in 7 projects
-
230. O_TEXTUsed in 7 projects
-
231. expand()Used in 7 projects
-
232. pipe2()Used in 7 projects
-
233. SEEK_DATAUsed in 7 projects
-
234. SEEK_HOLEUsed in 7 projects
-
235. getresuid()Used in 6 projects
-
236. device_encoding()Used in 6 projects
-
Used in 6 projects
-
238. EX_DATAERRUsed in 6 projects
-
239. Walk()Used in 6 projects
-
240. WCOREDUMPUsed in 5 projects
-
241. join()Used in 5 projects
-
242. random()Used in 5 projects
-
243. getresgid()Used in 5 projects
-
244. _Environ()Used in 5 projects
-
245. env()Used in 5 projects
-
246. environment()Used in 5 projects
-
247. fs_path()Used in 5 projects
-
248. __dict__()Used in 5 projects
-
249. exists()Used in 5 projects
-
Used in 5 projects
-
251. removexattr()Used in 5 projects
-
252. _exists()Used in 5 projects