摘要:
为了进一步规范python代码,提高可读性、可维护性,决定在module、class、function中尽可能的加入docstring。闲暇之余就写了一个sublime text 2的plugin,可以设定使用快捷键或者context menu来自动生成docstring,既减少了敲键盘的字数,也能更规范一些。下面是自动生成的docstring截图:插件源码已经公布在github上,具体地址为:https://github.com/JerryKwan/Sublime-Text-2-pydocstring希望这个小插件能给各位采用sublime text 2写python代码的朋友有所帮助 阅读全文
摘要:
转载一篇Gevent的教程gevent For the Working Python Developerhttp://sdiehl.github.com/gevent-tutorial/?utm_source=Python+Weekly+Newsletter&utm_campaign=9dc22cf663-Python_Weekly_Issue_34_May_10_2012&utm_medium=emailhttps://github.com/sdiehl/gevent-tutorial 阅读全文
摘要:
项目中碰到的问题,记录如下,期望能对他人有用。def valid_XML_char_ordinal(c): """ @summary: check if the char is a valid xml character @param c: the character to be checked @see: # http://www.w3.org/TR/2008/REC-xml-20081126/#charsets @result: True/False """ return ( # conditions ordered by p.. 阅读全文
摘要:
介绍一款由python实现的Nagios like 监控管理工具 Shinkenhttp://www.shinken-monitoring.org/主要功能介绍如下:1, Flexible monitoring and alerting capabilities2, Simple and modular discovery module3, Prioritize your effort based on business impact4, VMware auto dependency and VMotion support5, Business rules correlation6, Keep 阅读全文