Re: Creating a temporary file in Python

2007-10-31 Thread Diez B. Roggisch
looping wrote: Hi, I want to create a temporary file, read it in an external command and finally delete it (in Windows XP). I try to use tempfile module but it doesn't work, the file couldn't be open by my other process (error like: SP2-0310: unable to open file c:

Creating a temporary file in Python

2007-10-31 Thread looping
Hi, I want to create a temporary file, read it in an external command and finally delete it (in Windows XP). I try to use tempfile module but it doesn't work, the file couldn't be open by my other process (error like: SP2-0310: unable to open file c:

Re: Creating a temporary file in Python

2007-10-31 Thread looping
On Oct 31, 2:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: I'm not an expert, but I think you need to close the file first - you under windows here, which can be picky about such stuff AFAIK. Or maybe there is some other mode-specifier. Diez Actually closing the file delete it without

Re: Creating a temporary file in Python

2007-10-31 Thread Diez B. Roggisch
looping wrote: On Oct 31, 2:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: I'm not an expert, but I think you need to close the file first - you under windows here, which can be picky about such stuff AFAIK. Or maybe there is some other mode-specifier. Diez Actually closing the file

Re: Creating a temporary file in Python

2007-10-31 Thread Sion Arrowsmith
looping [EMAIL PROTECTED] wrote: I want to create a temporary file, read it in an external command and finally delete it (in Windows XP). I try to use tempfile module but it doesn't work, the file couldn't be open by my other process (error like: SP2-0310: unable to open file c:

Re: Creating a temporary file in Python

2007-10-31 Thread looping
On Oct 31, 2:16 pm, Sion Arrowsmith [EMAIL PROTECTED] wrote: [ ... ] Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later). I didn't notice this