feisky

云计算、虚拟化与Linux技术笔记
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年4月9日

摘要: What is the difference between urllib and urllib2 modules of Python?You might be intrigued by the existence of two separate URL modules in Python -urllibandurllib2. Even more intriguing: they are not alternatives for each other. So what is the difference betweenurllibandurllib2, and do we need them 阅读全文

posted @ 2012-04-09 18:20 feisky 阅读(499) 评论(0) 推荐(0) 编辑

摘要: urllib.urlopen(url[, data[, proxies]]) : 创建一个表示远程url的类文件对象,然后像本地文件一样操作这个类文件对象来获取远程数据。参数url表示远程数据的路径,一般是网址;参数data表示以post方式提交到url的数据(玩过web的人应该知道提交数据的两种方式:post与get。如果你不清楚,也不必太在意,一般情况下很少用到这个参数);参数proxies用于设置代理(这里不详细讲怎么使用代理,感兴趣的看客可以去翻阅Python手册urllib模块)。urlopen返回 一个类文件对象,他提供了如下方法:read() , readline() , rea 阅读全文

posted @ 2012-04-09 18:18 feisky 阅读(1491) 评论(0) 推荐(0) 编辑

摘要: All low-level memory operations go through Xen.Guest OSes are responsible for allocating and initializing PTs for processes (restricted to read only access)allocates and initialize a page and register it with Xen to serve as the new PTDirect page writes are intercepted, validated and applied by the 阅读全文

posted @ 2012-04-09 15:51 feisky 阅读(1181) 评论(0) 推荐(0) 编辑

摘要: 链表是C语言编程中常用的数据结构,比如我们要建一个整数链表,一般可能这么定义: ? 1 2 3 4 struct int_node { int val; struct int_node *next; }; 为了实现链表的插入、删除、遍历等功能,另外要再实现一系列函数,比如: ? 1 2 3 4 5 6 7 8 9 void insert_node(struct int_node *head... 阅读全文

posted @ 2012-04-09 13:53 feisky 阅读(680) 评论(0) 推荐(0) 编辑

无觅相关文章插件,快速提升流量