• Home
  • Raw
  • Download

Lines Matching refs:_os

33 import os as _os  namespace
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)
210 if (_os.name == 'nt' and e.args[0] == _errno.EACCES and
211 _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
242 file = _os.path.join(dir, pre + name + suf)
244 fd = _os.open(file, flags, 0600)
246 return (fd, _os.path.abspath(file))
250 if (_os.name == 'nt' and e.errno == _errno.EACCES and
251 _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
337 file = _os.path.join(dir, prefix + name + suffix)
339 _os.mkdir(file, 0700)
344 if (_os.name == 'nt' and e.errno == _errno.EACCES and
345 _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
376 file = _os.path.join(dir, prefix + name + suffix)
416 if _os.name != 'nt':
422 unlink = _os.unlink
472 if _os.name == 'nt' and delete:
473 flags |= _os.O_TEMPORARY
477 file = _os.fdopen(fd, mode, bufsize)
480 _os.unlink(name)
481 _os.close(fd)
484 if _os.name != 'posix' or _os.sys.platform == 'cygwin':
513 _os.unlink(name)
514 return _os.fdopen(fd, mode, bufsize)
516 _os.close(fd)