advice on this little script

John Salerno johnjsal at NOSPAMgmail.com
Wed Mar 8 23:53:46 EST 2006


Ben Cartwright wrote:
> BartlebyScrivener wrote:
>> What about a console beep? How do you add that?
>>
>> rpd
> 
> Just use ASCII code 007 (BEL/BEEP):
> 
>   >>> import sys
>   >>> sys.stdout.write('\007')
> 
> Or if you're on Windows, use the winsound standard module.
> 
> --Ben
> 

I'd prefer to be platform neutral when possible. Is the first option 
that, or does this change depending on OS?



More information about the Python-list mailing list