equal
deleted
inserted
replaced
12 import os |
12 import os |
13 import tempfile |
13 import tempfile |
14 |
14 |
15 __all__ = ('NamedTemporaryFile', 'gettempdir',) |
15 __all__ = ('NamedTemporaryFile', 'gettempdir',) |
16 |
16 |
17 if os.name == 'nt': |
17 if os.name == 'nt' and hasattr(os, 'unlink') and hasattr(os, 'fdopen'): |
18 class TemporaryFile(object): |
18 class TemporaryFile(object): |
19 """ |
19 """ |
20 Temporary file object constructor that works in Windows and supports |
20 Temporary file object constructor that works in Windows and supports |
21 reopening of the temporary file in windows. |
21 reopening of the temporary file in windows. |
22 """ |
22 """ |