Home | History | Annotate | Download | only in python2.7

Lines Matching refs:_os

33 import os as _os
65 _text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL
66 if hasattr(_os, 'O_NOINHERIT'):
67 _text_openflags |= _os.O_NOINHERIT
68 if hasattr(_os, 'O_NOFOLLOW'):
69 _text_openflags |= _os.O_NOFOLLOW
72 if hasattr(_os, 'O_BINARY'):
73 _bin_openflags |= _os.O_BINARY
75 if hasattr(_os, 'TMP_MAX'):
76 TMP_MAX = _os.TMP_MAX
86 if hasattr(_os, "lstat"):
87 _stat = _os.lstat
88 elif hasattr(_os, "stat"):
89 _stat = _os.stat
97 raise _os.error
103 except _os.error:
122 self.normcase = _os.path.normcase
126 cur_pid = _os.getpid()
156 dirname = _os.getenv(envname)
160 if _os.name == 'riscos':
161 dirname = _os.getenv('Wimp$ScrapDir')
163 elif _os.name == 'nt':
170 dirlist.append(_os.getcwd())
171 except (AttributeError, _os.error):
172 dirlist.append(_os.curdir)
190 if dir != _os.curdir:
191 dir = _os.path.normcase(_os.path.abspath(dir))
195 filename = _os.path.join(dir, name)
197 fd = _os.open(filename, flags, 0o600)
203 _os.close(fd)
205 _os.unlink(filename)
237 file = _os.path.join(dir, pre + name + suf)
239 fd = _os.open(file, flags, 0600)
241 return (fd, _os.path.abspath(file))
327 file = _os.path.join(dir, prefix + name + suffix)
329 _os.mkdir(file, 0700)
361 file = _os.path.join(dir, prefix + name + suffix)
401 if _os.name != 'nt':
407 unlink = _os.unlink
455 if _os.name == 'nt' and delete:
456 flags |= _os.O_TEMPORARY
459 file = _os.fdopen(fd, mode, bufsize)
462 if _os.name != 'posix' or _os.sys.platform == 'cygwin':
491 _os.unlink(name)
492 return _os.fdopen(fd, mode, bufsize)
494 _os.close(fd)