2005年08月12日 星期五 14:36
Skype现在很火,引领了VoIP产业浪潮。 现在不用羡慕了,Shtoom,python开发,不仅是个VoIP的客户端,更是个完整的VoIP开发平台。 OSCON 2005上作了现场演示,感兴趣的可以了解一下。 http://divmod.org/projects/shtoom Shtoom is a open-source, cross-platform VoIP softphone, implemented in Python. As well as the basic phone, the package also includes a number of other applications - - shtoomphone - the end-user phone - doug - a framework for writing server-side voip applications. There's a number of applications implemented using doug that ship with shtoom. - shtam - a simple answering machine/voicemail application - shmessage - an announcement server - shtoomcu - a simple conferencing server Shtoom 需要 Python 2.3 <http://www.python.org/2.3.4/> or later, and Twisted 1.3 <http://www.twistedmatrix.com/> or later. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050812/1c577180/attachment.htm
2005年08月19日 星期五 10:13
实现了sip的协议栈吗? 在 05-8-12,TianLiangLe<alang.yl at gmail.com> 写道: > > > Skype现在很火,引领了VoIP产业浪潮。 > 现在不用羡慕了,Shtoom,python开发,不仅是个VoIP的客户端,更是个完整的VoIP开发平台。 > OSCON 2005上作了现场演示,感兴趣的可以了解一下。 > > > http://divmod.org/projects/shtoom > > Shtoom is a open-source, cross-platform VoIP softphone, implemented in > Python. As well as the basic phone, the package also includes a number of > other applications - > shtoomphone - the end-user phone > doug - a framework for writing server-side voip applications. There's a > number of applications implemented using doug that ship with shtoom. > shtam - a simple answering machine/voicemail application > shmessage - an announcement server > shtoomcu - a simple conferencing server > > Shtoom 需要 Python 2.3 or later, and Twisted 1.3 or later. > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- 梅劲松
2005年08月19日 星期五 10:38
On 8/19/05, 梅劲松 <stephen.cn at gmail.com> wrote: > 实现了sip的协议栈吗? > 有的, http://divmod.org/projects/shtoom 另外一个相关项目是 Quotient http://divmod.org/projects/quotient/rightnow -- simple is good
2005年08月20日 星期六 10:03
老梅有相关资料吗,这个网我去过,我是做VOIP的啊,哈。。。相知道啊,谢谢了 在 05-8-19,梅劲松<stephen.cn at gmail.com> 写道: > 实现了sip的协议栈吗? > > 在 05-8-12,TianLiangLe<alang.yl at gmail.com> 写道: > > > > > > Skype现在很火,引领了VoIP产业浪潮。 > > 现在不用羡慕了,Shtoom,python开发,不仅是个VoIP的客户端,更是个完整的VoIP开发平台。 > > OSCON 2005上作了现场演示,感兴趣的可以了解一下。 > > > > > > http://divmod.org/projects/shtoom > > > > Shtoom is a open-source, cross-platform VoIP softphone, implemented in > > Python. As well as the basic phone, the package also includes a number of > > other applications - > > shtoomphone - the end-user phone > > doug - a framework for writing server-side voip applications. There's a > > number of applications implemented using doug that ship with shtoom. > > shtam - a simple answering machine/voicemail application > > shmessage - an announcement server > > shtoomcu - a simple conferencing server > > > > Shtoom 需要 Python 2.3 or later, and Twisted 1.3 or later. > > _______________________________________________ > > python-chinese list > > python-chinese at lists.python.cn > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > -- > 梅劲松 > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- 联系电话:0512-62216515 QQ:104609351 MSN:kinnsei1 at hotmail.com skype:kinnsei98
2005年08月20日 星期六 11:13
if dev.get('bootproto')=="dhcp":
str_net_gentoo=str_net_gentoo+'"dhcp"\n'
xml.modify_element(instPath, ip_xpath, "dhcp")
else:
str_net_gentoo=str_net_gentoo+'"'+dev.get('ipaddr')+" netmask
"+dev.get('netmask')+'"\n'
xml.modify_element(instPath, ip_xpath, dev.get('ipaddr'))
xml.modify_element(instPath, mask_xpath, dev.get('netmask'))
上面是一段代码,说什么也无法通过。
报错在第六行: unindent does not match any outer indentation level
我一直都没有理解python到底是怎么区分if块和else块的。
如果是靠缩进。这个没问题阿???
请高手指定
2005年08月20日 星期六 11:40
应该是这样的:
if ...:
....
else:
...
缩进要统一,要么用4个空格,要么用Tab,不要混用。
On 8/20/05, Tom <zysno1 at gmail.com> wrote:
> if dev.get('bootproto')=="dhcp":
> str_net_gentoo=str_net_gentoo+'"dhcp"\n'
> xml.modify_element(instPath, ip_xpath, "dhcp")
> else:
> str_net_gentoo=str_net_gentoo+'"'+dev.get('ipaddr')+" netmask
> "+dev.get('netmask')+'"\n'
> xml.modify_element(instPath, ip_xpath, dev.get('ipaddr'))
> xml.modify_element(instPath, mask_xpath, dev.get('netmask'))
>
>
> 上面是一段代码,说什么也无法通过。
>
> 报错在第六行: unindent does not match any outer indentation level
>
> 我一直都没有理解python到底是怎么区分if块和else块的。
>
> 如果是靠缩进。这个没问题阿???
>
> 请高手指定
>
>
>
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
>
--
Best Regards,
Leo Jay
2005年08月20日 星期六 13:00
An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050820/483a2607/attachment.html
2005年08月20日 星期六 14:25
>
>
> 谢谢回复。其实我就是这么写的。但是帖上来的时候格式乱了。:)
>
> 我再描述一下吧。
>
> if dev.get('bootproto')=="dhcp":
> str_net_gentoo=str_net_gentoo+'"dhcp"\n'
> else:
> str_net_gentoo=str_net_gentoo+'"'+dev.get('ipaddr')+" netmask
> "+dev.get('netmask')+'"\n'
>
>
> 原来的代码就是这样的,没有报错。
>
> 然后我要修改一下,增加了两行。就是红色的两行
> if dev.get('bootproto')=="dhcp":
> str_net_gentoo=str_net_gentoo+'"dhcp"\n'
> modify_element(instPath, gateway_xpath, self.gateway)
> else:
> modify_element(instPath, gateway_xpath, self.gateway)
> str_net_gentoo=str_net_gentoo+'"'+dev.get('ipaddr')+" netmask
> "+dev.get('netmask')+'"\n'
>
请把你的代码用附件形式上传,否则看不明白你是怎么缩进的。
>
> 结果就出了问题。
>
>unindent does not match any outer indentation level
>
>
>我发现有很多的if,else都是这样写的。
>
>if ***:
>***
>else:
>***
>
>不是说必须要缩进么。。这是什么意思阿??
>
>
没有缩进应该会出错的,可能是你的文本编辑器的问题,不能正确显示缩进。
Hong Yuan
大管家网上建材超市
www.homemaster.cn
2005年08月20日 星期六 16:49
如果在web上发信,有些是不支持空白缩近的,因为html会忽略掉它。但gmail可以处理空格,不能处理tab符,因此建议缩近使用空格符,不要使用tab。 把你的问题转为空白符再发上来吧。 -- I like python! My Donews Blog: http://www.donews.net/limodou
2005年08月20日 星期六 19:11
limodou wrote: >如果在web上发信,有些是不支持空白缩近的,因为html会忽略掉它。但gmail可以处理空格,不能处理tab符,因此建议缩近使用空格符,不要使用tab。 > >把你的问题转为空白符再发上来吧。 > > > >------------------------------------------------------------------------ > >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese > > 奇怪。刚刚用pydent执行了一下。格式已经正确了。也不报错了。 if ***: *** *** else: *** *** 也不报错了。
2005年08月21日 星期日 00:23
如题。谢谢 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050821/5074c6b9/attachment.html
2005年08月21日 星期日 02:06
在 05-8-21,Tom<zysno1 at gmail.com> 写道: > 如题。谢谢 用eval来执行你用变量组合成的字符串就可以了。
2005年08月21日 星期日 13:01
在 05-8-21,马踏飞燕<honeyday.mj at gmail.com> 写道: > 在 05-8-21,Tom<zysno1 at gmail.com> 写道: > > 如题。谢谢 > 用eval来执行你用变量组合成的字符串就可以了。 > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > 还可以在globals()或locals()返回的字典中增加项来实现。 -- I like python! My Donews Blog: http://www.donews.net/limodou
Zeuux © 2025
京ICP备05028076号