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/oosky/archive/2005/10/11/639.html
Lesson 1 准备好学习Python的环境
Python 的官方网址:
www.python.org
点击下面连接就可以直接下载了,这里只提供了Windows下的Python。
http://www.python.org/ftp/python/2.4.2/python-2.4.2.msi
linux版本的我就不说了,因为如果你能够使用linux并安装 ......
4、Tuples 元组
元组和Lists相似,但它是immutable,初始化后不能改变其内容,这在程序中有时候很有用,可以用来防止定义的变量内容被意外改变。
5、Files 文件
文件操作和c语言比较接近,下面只通过代码演示:
>>> f = open('data.txt','w')
>>> ......
前一篇讲了简单的C/C++调用Python脚本模块(.py)。既然是用于诸多游戏程序的脚本语言,那肯定是缺不了互调(礼尚往来)。因此,本篇讲一个简单的python调用C/C++写的DLL模块,对Python进行功能扩展。这里写一个简单的例子,主要就为了了解下这么用Python来调用C/C++写的DLL库。好了,切入正题:
首先,我是用VS2003 ......
Ctrl+3 行注释
Ctr+\ 去行注释
Ctrl+Shift+3 去行注释
Ctrl+4 块注释
Ctrl+5 & ......