Gabriel Farrell wrote:
> On Tue, Jul 11, 2006 at 03:04:02PM -0400, Kent Johnson wrote:
>
>> Try bob.flush() instead of bob.read(), my guess is the read() is forcing
>> a flush().
>>
>
> That works! Thanks, Kent. If I understand flush (looking at [1]), I
> got no output because the data f
On Tue, Jul 11, 2006 at 03:04:02PM -0400, Kent Johnson wrote:
> Try bob.flush() instead of bob.read(), my guess is the read() is forcing
> a flush().
That works! Thanks, Kent. If I understand flush (looking at [1]), I
got no output because the data for the stream wasn't written to the
file befo
Gabriel Farrell wrote:
> I have an issue with the tempfile module that I can't figure out.
>
> Snippet of relevant script looks like so:
>
> 1 bob = tempfile.NamedTemporaryFile()
> 2 bob.write('Hallo!')
> 3 bob.read()
> 4 sam = tempfile.NamedTemporaryFile()
> 5 bobHandle = file(bob.name)
I have an issue with the tempfile module that I can't figure out.
Snippet of relevant script looks like so:
1 bob = tempfile.NamedTemporaryFile()
2 bob.write('Hallo!')
3 bob.read()
4 sam = tempfile.NamedTemporaryFile()
5 bobHandle = file(bob.name)
6 bobHandle.read()
As you can see, I