gee whiz, i thought i had poured over that line sufficiently.
It works now. imagine that.
thanks,
shawn

On 7/29/06, Python < [EMAIL PROTECTED]> wrote:
On Sat, 2006-07-29 at 09:26 -0500, shawn bright wrote:
> Hey there,
> i have an app with this line.....
> sys.stderr.write("GET DATA %s %d %d\n" (sound, time_limit, digit_count))

sys.stderr.write("GET DATA %s %d %d\n" % (sound, time_limit, digit_count))
                                   ----^----
You meant to do string interpolation, but left out the interpolation
(formating) operator.  So the parenthesized _expression_ looked like a
function call.

>
> it is failing with the following error.
>
> Traceback (most recent call last):
>   File "/usr/share/asterisk/agi-bin/ast_agi_test.agi", line 88, in ?
>     entered_digits = getNumber(welcome, time_limit, password_digits)
>   File "/usr/share/asterisk/agi-bin/ast_agi_test.agi", line 72, in
> getNumber
>     sys.stderr.write("GET DATA %s %d %d\n" (sound, time_limit,
> digit_count))
> TypeError: 'str' object is not callable
>
>
> anyone know what i may be doing wrong here?
>
> thanks
> shawn
> _______________________________________________
> Tutor maillist  -   [email protected]
> http://mail.python.org/mailman/listinfo/tutor
--
Lloyd Kvam
Venix Corp


_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to