04 2014 档案

摘要: 阅读全文
posted @ 2014-04-30 16:22 zhangbo2012 阅读(2540) 评论(2) 推荐(0)
摘要:使用正则表达式,对QQ群聊天记录进行解析,用于分析日期、成员等维度发言情况。 原始文本是2014-03-28 15:04:25 №┽◎Eagle(369029696) 解析之后yyyy=2014mm = 03dd = 28hh = 15mi =04ss = 25nick = №┽◎Eagleqq = 369029696 代码如下 # -*- coding: utf-8 -*- """ ... 阅读全文
posted @ 2014-04-30 10:07 zhangbo2012 阅读(587) 评论(0) 推荐(0)
摘要:snmp帮助运维人员快速收集信息和管理大量主机,一个管理工作站可以远程管理所有支持这种协议的网络设备,包括监视网络状态、修改网络设备配置、接收网络事件警告等。 一、SNMP的组成SNMP采用了Client/Server模型的特殊形式:代理/管理站模型。对网络的管理与维护是通过管理工作站与SNMP代理间的交互工作完成的。每个SNMP从代理负责回答SNMP管理工作站(主代理)关于MIB定义信息的各种查... 阅读全文
posted @ 2014-04-25 15:51 zhangbo2012 阅读(636) 评论(0) 推荐(0)
摘要:8. Errors and Exceptions Until now error messages haven’t been more than mentioned, but if you have tried out the examples you have probably seen some. There are (at least) two distinguishable kinds ... 阅读全文
posted @ 2014-04-08 14:42 zhangbo2012 阅读(252) 评论(0) 推荐(0)
摘要:7. Input and Output There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the... 阅读全文
posted @ 2014-04-08 09:58 zhangbo2012 阅读(223) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-04-07 10:53 zhangbo2012 阅读(182) 评论(0) 推荐(0)
摘要:6. Modules If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if you want to write a somewhat longer program, you... 阅读全文
posted @ 2014-04-05 20:24 zhangbo2012 阅读(209) 评论(0) 推荐(0)
摘要:5. Data Structures This chapter describes some things you’ve learned about already in more detail, and adds some new things as well. 5.1. More on Lists The list data type has some more methods. Here a... 阅读全文
posted @ 2014-04-02 22:25 zhangbo2012 阅读(213) 评论(0) 推荐(0)
摘要:4. More Control Flow Tools Besides the while statement just introduced, Python knows the usual control flow statements known from other languages, with some twists. 4.1. if Statements Perhaps the mo... 阅读全文
posted @ 2014-04-02 14:58 zhangbo2012 阅读(226) 评论(0) 推荐(0)
摘要:lambda函数和and - or技巧的使用 当collapse为true时,返回" ".join(s.split()),而当collapse为false时,则返回s processFunc = collapse and (lambda s: " ".join(s.split())) or (lambda s: s)这个函数主要着重于简单的模糊处理和默认参数处理def ask_ok(prompt... 阅读全文
posted @ 2014-04-02 14:48 zhangbo2012 阅读(1146) 评论(0) 推荐(0)
摘要:if __name__=='__main__' 的原理说明 阅读全文
posted @ 2014-04-01 21:31 zhangbo2012 阅读(140) 评论(0) 推荐(0)
摘要:测试三种遍历列表方法的性能 阅读全文
posted @ 2014-04-01 17:19 zhangbo2012 阅读(1194) 评论(0) 推荐(0)