[Tutor] File Stream Assignment?

Alan Gauld alan.gauld at btinternet.com
Sat Jun 21 19:01:13 CEST 2008


"FT" <chester_lab at fltg.net> wrote in message 
news:002701c8d383$6a53ea40$0301a8c0 at brucetower...
>
> Alan,
>
>    This is what I wrote in python.
>
> file4tts = open('test.wav', 'w', True)
> av.AudioOutputStream = file4tts
> av.Speak( "Hello World!", ASYNC)
> file4tts.close

You need parentheses after close. Otherwise you are
evaluating the function not executing it. Without closing
the file thre is a possibility that the buffer is not being
flushed to disk.

But it could be a typo in which case I don't know what
the problem is! :-)

Alan G. 




More information about the Tutor mailing list