[Tutor] Request for guidance about a python syntax

Ganesh Borse bganesh05 at gmail.com
Mon Dec 19 16:54:55 CET 2011


Dear Tutors,

I am new to python.

I am trying to understand (& use) the python implementation of goertzel
implementation provided on
http://www.black-aura.com/blog/2011/12/10/python-implementation-of-the-goertzel-algorithm-dtmf-decoding/
.

This python program uses unpack_from() function to unpack string into array
of ints, with the following statement:
frames = struct.unpack_from(*"%dH" % nframes * **nchannels*, frames)

I could know the use of unpack_from, but I could not understand the "fmt"
part, i.e *"%dH" % nframes * nchannels*.
Can you pls help me know, what is the purpose of two "%" signs in this
statement?

Thanks for your help in advance.

Best Regards,
banes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111219/82296083/attachment.html>


More information about the Tutor mailing list