BASIC vs Python
Dan Bishop
danb_83 at yahoo.com
Thu Jan 6 01:12:06 EST 2005
Christos TZOTZIOY Georgiou wrote:
> On 17 Dec 2004 15:53:51 -0800, rumours say that "ladasky at my-deja.com"
> <ladasky at my-deja.com> might have written:
>
> >> The BASICs of my youth also supported graphics and sounds.
> >>
> >> PLAY "CGFED>C<GFED>C<GFEFB"
> >
> >Now wait a minute, shouldn't that be...
> >
> >PLAY "CGFED>C<GFED>C<GFEFD" ? :^)
>
> You tell us :)
>
> ***
> music.py -- assuming winsound exists
> ***
I wrote a similar program once on my Linux box. It plays notes by
writing the ANSI escape sequence
"\x1B[10;%d]\x1B[11;%d]\a\x1B[10]\x1B[11]" % (freq, duration) to the
terminal.
More information about the Python-list
mailing list