[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

Terry J. Reedy report at bugs.python.org
Wed Jul 21 08:41:33 CEST 2010


Terry J. Reedy <tjreedy at udel.edu> added the comment:

On windows, I can only import nt, not posix, ce, os2.
>>> import posix
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import posix
ImportError: No module named posix
>>> import nt
>>> dir(nt)
['F_OK', 'O_APPEND', 'O_BINARY', 'O_CREAT', 'O_EXCL', 'O_NOINHERIT', 'O_RANDOM', 'O_RDONLY', 'O_RDWR', 'O_SEQUENTIAL', 'O_SHORT_LIVED', 'O_TEMPORARY', 'O_TEXT', 'O_TRUNC', 'O_WRONLY', 'P_DETACH', 'P_NOWAIT', 'P_NOWAITO', 'P_OVERLAY', 'P_WAIT', 'R_OK', 'TMP_MAX', 'W_OK', 'X_OK', '__doc__', '__name__', '__package__', '_exit', '_getfullpathname', 'abort', 'access', 'chdir', 'chmod', 'close', 'closerange', 'device_encoding', 'dup', 'dup2', 'environ', 'error', 'execv', 'execve', 'fstat', 'fsync', 'getcwd', 'getcwdb', 'getpid', 'isatty', 'listdir', 'lseek', 'lstat', 'mkdir', 'open', 'pipe', 'putenv', 'read', 'remove', 'rename', 'rmdir', 'spawnv', 'spawnve', 'startfile', 'stat', 'stat_float_times', 'stat_result', 'statvfs_result', 'strerror', 'system', 'times', 'umask', 'unlink', 'urandom', 'utime', 'waitpid', 'write']
I guessed there might be some trickery because I say the ifdef Windows in posixmodule.c.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9299>
_______________________________________


More information about the Python-bugs-list mailing list