2011-09-28 62 views

回答

2

看来他们并不真正与with声明兼容。试试这个:

from twilio import twiml 

r = twiml.Response() 
r.say("hello") 
g = r.gather(finishOnKey=4) 
g.say("world") 
print str(r) 

这里就是我得到:

>>> from twilio import twiml 
>>> 
>>> r = twiml.Response() 
>>> r.say("hello") 
<twilio.twiml.Say object at 0x1098d05d0> 
>>> g = r.gather(finishOnKey=4) 
>>> g.say("world") 
<twilio.twiml.Say object at 0x1098d0950> 
>>> print str(r) 
<?xml version="1.0" encoding="UTF-8"?><Response><Say>hello</Say><Gather finishOnKey="4"><Say>world</Say></Gather></Response> 
+0

请参阅Rob的答案,下面详细介绍他们的修复。 –

2

埃米特 - 良好的渔获物。

马特 - 音调完美的反应。

我们只是把修复此问题与3.3.2 - 你可以把它捡起来关闭的PyPI或在这里的GitHub库:

https://github.com/twilio/twilio-python

只需更新模块和记录方法将工作。请给我的个人资料中的地址发送电子邮件 - 你们刚刚获得了Twilio T恤。 :)

+0

酷 - 但我没有看到任何电子邮件在你的个人资料:( –

+0

嘿,我仍然想要我的tshit:P –