Re: tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Imbaud Pierre
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

Re: tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Imbaud Pierre
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

Re: tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Peter Otten
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

Re: tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Steven D'Aprano
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

Re: tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Steven D'Aprano
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. > >

Re: tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Bjoern Schliessmann
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

tempfile.NamedTemporaryFile wont work

2006-11-19 Thread Imbaud Pierre
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