Title: tempfile.TemporaryFile differs between platforms
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, georg.brandl, loafman
Priority: normal Keywords:

Created on 2007-08-18 02:31 by loafman, last changed 2007-08-23 17:17 by georg.brandl. This issue is now closed.

Messages (3)
msg32654 - (view) Author: Kenneth Loafman (loafman) Date: 2007-08-18 02:31
When running the following:

import tempfile

Linux returns:
<type 'file'>

Windows and Cygwin return:
<type 'instance'>

It should return the same across platforms, or return an undefined indication if not possible.
msg32655 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-08-19 12:54
It's not a bug. The interface for both types are equal. Python doesn't guarantee that it uses the same types on every platform. It just guarantees that the behavior of the objects are the same on both platforms. Please study for detailed information.
msg55162 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 17:17
I agree with tiran.  TemporaryFile(...) returns a file-like object, the
details are implementation specific.
Date User Action Args
2007-08-23 17:17:56georg.brandlsetstatus: open -> closed
resolution: not a bug
messages: + msg55162
nosy: + georg.brandl
2007-08-18 02:31:16loafmancreate