python rss解析与生成
PyRSS2Gen :rss生成
下载地址:http://www.dalkescientific.com/Python/PyRSS2Gen-1.0.0.tar.gz
例子:
Java代码
import datetime
import PyRSS2Gen
rss = PyRSS2Gen.RSS2(
title = "Andrew's PyRSS2Gen feed",
link = "http://www.dalkescientific.com/Python/PyRSS2Gen.html",
description = "The latest news about PyRSS2Gen, a "
"Python library for generating RSS2 feeds",
lastBuildDate = datetime.datetime.now(),
items = [
PyRSS2Gen.RSSItem(
title = "PyRSS2Gen-0.0 released",
link = "http://www.dalkescientific.com/news/030906-PyRSS2Gen.html",
description = "Dalke Scientific today announced PyRSS2Gen-0.0, "
"a library for generating RSS feeds for Python. ",
guid = PyRSS2Gen.Guid("http://www.dalkescientific.com/news/"
"030906-PyRSS2Gen.html"),
&n
相关文档:
http://www.cppblog.com/jacky2019/archive/2007/05/17/24269.html
c++中嵌入python入门1
本人是用vc2003+python2.5学习的,其它的也应该差不了多少
0. 坏境设置
把python的include/libs目录分别加到vc的include/lib directories中去。另外,由于python没有提供debug lib,体地说,就是没有提供python25_d.lib了。你可 ......
(偶尔看到,怕忘了)
仿用户打开浏览器然后点击等行为然后获取结果,以下是我使用过的方法只是依赖与ie不过firefox等应该也有相应的调用方法:
思路就是调用ie的com组件然后就是对dom的操作跟用javascript操作dom类似,示范代码如下
#天涯登陆地址
tianyalogin = "http://www.tianya.cn/"
tianya_user = "xxxxx"
......
3. Dictionaries 字典类型
Python中,字典类型并不是顺序容器,而类似c++中的关联容器(map),Dictionaries中存储的是键/值 对,和map不同的是,Python的Dictionaries中可以存任意对象类型。Dictionaries类型也是可变的,和Lists一样,可以原地修改(通过下标修改)。
下面通 ......
#!/usr/bin/env python
# -*-coding:UTF-8-*-#这一句告诉python用UTF-8编码
#=========================================================================
#
# NAME: Python MySQL test
#
# AUTHOR: benyur
# DATE : 2004-12-28
#
# COMMENT: 这是一个python连接mysql的例子
#
#================ ......
import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough t ......