keypressed...
gabor
gabor at z10n.net
Mon Feb 10 22:29:27 EST 2003
On Tue, 2003-02-11 at 01:16, Dennis Lee Bieber wrote:
> gabor fed this fish to the penguins on Sunday 09 February 2003 08:54 pm:
>
> >
> > well... at the end i'll have to port it to some graphics-toolkit, so i
> > don't want to be tied to an ascii-gui too much ...
> > gabor
>
> That's the justification for creating your own basic "gui" function
> library -- keep the interface the same, and reimplement the library to
> port <G>
actually my app was a command line based application:
"mysong.py artist madonna" would play all my adonna mp3s in random
order, "mysong.py genre jazz" would play all my jazz mp3s and so on.
the only thing i wanted was to have around 2-3 keys to work , like
next-song, prev-song.
but because playing the audio means something like:
while True:
buffer = mp3Object.getSomeData()
if len(buffer) == 0:
break;
soundCard.play(buffer)
so all you can do you have to do inside that while-loop...
that's why i wanted to check for those 2-4 keys somehow.
now i transferred it into curses and it works of course, but i hoped
that there are some simpler solutions ( like a keypressed function :-)
gabor
>
> --
> > ============================================================== <
> > wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> > wulfraed at dm.net | Bestiaria Support Staff <
> > ============================================================== <
> > Bestiaria Home Page: http://www.beastie.dm.net/ <
> > Home Page: http://www.dm.net/~wulfraed/ <
More information about the Python-list
mailing list