Peter Otten a écrit :
> Steven D'Aprano wrote:
>
>
>>On Sun, 19 Nov 2006 13:11:13 +0100, Imbaud Pierre wrote:
>>
>>
>>>On suse 9.3, tempfile.NamedTemporaryFile() doesnt work as expected.
>>
>>[snip]
>>
>>
>>>Symptom: the file does not always exist, after the call to
>>>NamedTemporaryFile(). Or at
Steven D'Aprano a écrit :
> On Sun, 19 Nov 2006 13:18:39 +0100, Bjoern Schliessmann wrote:
>
>
>>Imbaud Pierre wrote:
>>
>>
>>> tf = tempfile.NamedTemporaryFile()
>>> tfName = tf.name
>>>[...]
>>> print >> sys.stderr, '%s: %s' % (tfName, ['no',
>>>'yes'][os.pat
Steven D'Aprano wrote:
> On Sun, 19 Nov 2006 13:11:13 +0100, Imbaud Pierre wrote:
>
>> On suse 9.3, tempfile.NamedTemporaryFile() doesnt work as expected.
> [snip]
>
>> Symptom: the file does not always exist, after the call to
>> NamedTemporaryFile(). Or at least its not seen by the strings com
On Sun, 19 Nov 2006 13:18:39 +0100, Bjoern Schliessmann wrote:
> Imbaud Pierre wrote:
>
>> tf = tempfile.NamedTemporaryFile()
>> tfName = tf.name
>> [...]
>> print >> sys.stderr, '%s: %s' % (tfName, ['no',
>> 'yes'][os.path.exists(tfName)])
>> s
On Sun, 19 Nov 2006 13:11:13 +0100, Imbaud Pierre wrote:
> On suse 9.3, tempfile.NamedTemporaryFile() doesnt work as expected.
[snip]
> Symptom: the file does not always exist, after the call to
> NamedTemporaryFile(). Or at least its not seen by the strings command,
> or by os.path.exists.
>
>
Imbaud Pierre wrote:
> tf = tempfile.NamedTemporaryFile()
> tfName = tf.name
> [...]
> print >> sys.stderr, '%s: %s' % (tfName, ['no',
> 'yes'][os.path.exists(tfName)])
> subprocess.Popen(['strings', tfName])
Just out of curiosity: Why did you a
On suse 9.3, tempfile.NamedTemporaryFile() doesnt work as expected.
(I found a permanent workaround, so I dont ask for help)
I expected to write to a file, and access it thru a shell command.
This code, in a loop:
tf = tempfile.NamedTemporaryFile()
tfName = tf.name