[Tutor] TypeError and audio input
Deirdre Saoirse
deirdre@deirdre.net
Mon, 25 Sep 2000 16:46:49 -0700 (PDT)
On Wed, 20 Sep 2000 michaelbaker@operamail.com wrote:
> I'm not sure what this means:
>
> >>> a=('D:\\Temp\pentagon.wav')
> >>> import wave
> >>> l=wave.Wave_read.getnframes
> >>> l(a)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: unbound method must be called with class instance 1st argument
>
> how can I remedy this?
is getnframes a function? If so, it should be:
l=wave.Wave_read.getnframes()
> Also, can Python analyze input from a hardware audio in device like a
> microphone port? maybe with fileinput? stdin?
I dunno about on windows, but on unix audio is a pseudofile device. So it
can be opened the same way anything else can.
> thanks, a newbie couldn't survive without tutor@python.org!
Sorry it took so long to get back to you on this (and if there were other
answers, I deleted them in my mailbox cleanup): I was getting married and
have been really busy the last few days in particular.
--
_Deirdre * http://www.sfknit.org * http://www.deirdre.net
"More damage has been caused by innocent program crashes than by
malicious viruses, but they don't make great stories."
-- Jean-Louis Gassee, Be Newsletter, Issue 69