<?xml version="1.0" encoding="GB2312"  ?>

			<rss version="2.0">

			<channel>

			<title>ChinaUnix.net - Python</title>

			<link>http://bbs.chinaunix.net/forumdisplay.php?fid=55</link>

			<description><![CDATA[Python是一种解释性，面向对象，动态语义，语法优美的通用程序设计编程语言。
已经成为世界上发展最快的语言之一...]]></description>
			<managingEditor>admin2@staff.chinaunix.net</managingEditor>

			<webMaster>admin2@staff.chinaunix.net</webMaster>

			<lastBuildDate>2010-03-22 06:03:23</lastBuildDate>
<item>

				<title>[已售出]三本Python书籍半价转让 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1679706</link>

  				<author>yigenjin</author>
  				<pubDate>2010-03-20 18:18:00</pubDate>
				<description><![CDATA[

				作者: yigenjin

				发表于: 2010-03-20 18:18:00 (GMT 8)

				简介：[i=s] 本帖最后由 yigenjin 于 2010-03-21 17:00 编辑 [/i]

已经售出。

				]]></description>

				</item>
<item>

				<title>python PIL image truncated (43 bytes not processed)问题 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1679446</link>

  				<author>pywlfk</author>
  				<pubDate>2010-03-19 19:10:46</pubDate>
				<description><![CDATA[

				作者: pywlfk

				发表于: 2010-03-19 19:10:46 (GMT 8)

				简介：在做图片的缩略的时候出现image file is truncated (43 bytes not processed)？？？？？

				]]></description>

				</item>
<item>

				<title>如果程序要开上一二天，防止它卡住，有什么办法？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1679381</link>

  				<author>wqjwftcaqr</author>
  				<pubDate>2010-03-19 16:27:47</pubDate>
				<description><![CDATA[

				作者: wqjwftcaqr

				发表于: 2010-03-19 16:27:47 (GMT 8)

				简介：工作需要，经常处理很多的信息，都是来自于网站上的采集，所以处理速度不快，要采集一二天

但最近发现 程序老是会卡住，我想应该不是编程错误， 也许开的时间太长，或者是别的什么原因

有没有办法编什么语句解决这个问题？或者是其它什么原因？

				]]></description>

				</item>
<item>

				<title>[图] 有没有简单的让python的web服务器运行PHP脚本的方法 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1679280</link>

  				<author>盖茨他爹</author>
  				<pubDate>2010-03-19 14:17:08</pubDate>
				<description><![CDATA[

				作者: 盖茨他爹

				发表于: 2010-03-19 14:17:08 (GMT 8)

				简介：我知道用python实现一个web服务器非常简单，只需要简短的几行代码，就可以开发出支持HTML静态网页的web服务器，再多加几行代码，就可以以CGI的模式运行python脚本，从而开发动态网站。

那么python有没有简单的方法去支持PHP呢？CGI模式或ISAPI模式都可以，只要让它能运行PHP，哪位大侠可以提供一个最原始的demo吗，在下不胜感激。


我想实现一种在个人PC上解

				]]></description>

				</item>
<item>

				<title>为什么没有写入到文件 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1679253</link>

  				<author>finechore</author>
  				<pubDate>2010-03-19 13:36:05</pubDate>
				<description><![CDATA[

				作者: finechore

				发表于: 2010-03-19 13:36:05 (GMT 8)

				简介：[i=s] 本帖最后由 finechore 于 2010-03-19 13:37 编辑 [/i]

#!/usr/bin/python
import os, sys
host = '''
abc:def:ghi
'''
for hosts in host.split("\n"):
        ff = file('test.log', 'w')
        if hosts:

				]]></description>

				</item>
<item>

				<title>GAE中如何终止代码运行？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1679015</link>

  				<author>幻想曲yibin</author>
  				<pubDate>2010-03-18 21:36:30</pubDate>
				<description><![CDATA[

				作者: 幻想曲yibin

				发表于: 2010-03-18 21:36:30 (GMT 8)

				简介：[code]
class PublicPage(webapp.RequestHandler):
    def initialize(self, request, response):
        webapp.RequestHandler.initialize(self, request, response)
        self.is_mobile = 'vnd.wap.wml

				]]></description>

				</item>
<item>

				<title>python的types简单用法报错！ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678998</link>

  				<author>laohuanggua</author>
  				<pubDate>2010-03-18 20:48:45</pubDate>
				<description><![CDATA[

				作者: laohuanggua

				发表于: 2010-03-18 20:48:45 (GMT 8)

				简介：#!/usr/bin/python2.6
#
#
import types

g=input("press your guess")
type_g=type(g)
print type_g
#g=int(g)
#print g

结果报告

这是一个程序的开始判断输入变量类型的部分

要求必须用数字。实验时候，我专门输入了一个字母t

结果报告

./cais

				]]></description>

				</item>
<item>

				<title>boost:python安装时出错：（ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678937</link>

  				<author>lioujian47</author>
  				<pubDate>2010-03-18 17:43:54</pubDate>
				<description><![CDATA[

				作者: lioujian47

				发表于: 2010-03-18 17:43:54 (GMT 8)

				简介：按照这里所说： 
[url]http://www.boost.org/doc/libs/1_42_0/libs/python/doc/building.html[/url] 
》》》 
C:\boost_1_34_0\…\quickstart> bjam toolset=msvc --verbose-test test 
我增加了一个参数--with-python 
结果如下： 
C:

				]]></description>

				</item>
<item>

				<title>python的处理速度，好象挺慢的？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678617</link>

  				<author>wqjwftcaqr</author>
  				<pubDate>2010-03-18 09:59:27</pubDate>
				<description><![CDATA[

				作者: wqjwftcaqr

				发表于: 2010-03-18 09:59:27 (GMT 8)

				简介：1python选择版本对 处理信息的速度有没有关系？如果有，用什么方法，和什么版本比较快？


2什么语言处理速度最快？

				]]></description>

				</item>
<item>

				<title>招兼职python或TCL编程讲师 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678582</link>

  				<author>hehe1314521</author>
  				<pubDate>2010-03-18 09:07:35</pubDate>
				<description><![CDATA[

				作者: hehe1314521

				发表于: 2010-03-18 09:07:35 (GMT 8)

				简介：本公司现招兼职python或TCL编程培训讲师，待遇

优，可周末，有意者请联系我

QQ:496397940，邮

件:hailang869@163.com

				]]></description>

				</item>
<item>

				<title>字浮串处理 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678554</link>

  				<author>shihyu</author>
  				<pubDate>2010-03-18 00:13:46</pubDate>
				<description><![CDATA[

				作者: shihyu

				发表于: 2010-03-18 00:13:46 (GMT 8)

				简介：我想把 >30</font></b> 字浮串处理只保留数字
就是只要30 剩下的都不要 请问python 有这样函数吗?

还是有什么好方法处理

谢谢

				]]></description>

				</item>
<item>

				<title>工厂函数问题 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678472</link>

  				<author>zcsgamer</author>
  				<pubDate>2010-03-17 20:15:29</pubDate>
				<description><![CDATA[

				作者: zcsgamer

				发表于: 2010-03-17 20:15:29 (GMT 8)

				简介：函数：
def f1():
    x=88
    def f2():
        print x
    return f2

问题：
a=f1

此时，a()和f1()输出结果不一样，为什么？

查过id(a)，id(f1)，id(a())，id(f1())，结果都一样，为什么上面的结果不一样？

				]]></description>

				</item>
<item>

				<title>如何设置跨文件的全局类型 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678424</link>

  				<author>pythonfreshman</author>
  				<pubDate>2010-03-17 18:17:27</pubDate>
				<description><![CDATA[

				作者: pythonfreshman

				发表于: 2010-03-17 18:17:27 (GMT 8)

				简介：python新手，请教各位一个问题。

在perl中，全局类型是可以跨文件的。比如
a.pl
func();

b.pl
sub func()
{
        print "in func\n";
}

require 'a.pl';

那么# perl b.pl没有问题。

可是python对namespace的限制比较严格，全局变量也只能是文件内的。如何能实

				]]></description>

				</item>
<item>

				<title>对比方法，哪个最好？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678391</link>

  				<author>wqjwftcaqr</author>
  				<pubDate>2010-03-17 17:12:26</pubDate>
				<description><![CDATA[

				作者: wqjwftcaqr

				发表于: 2010-03-17 17:12:26 (GMT 8)

				简介：[i=s] 本帖最后由 wqjwftcaqr 于 2010-03-17 17:26 编辑 [/i]

a=['abc123','cer456','abc5869','abcd45568']
假设变量b，已经赋值了
#用b 在a里面找一找，如果找到：           （这里的用什么代码最好？）
    动作。。。。
#如果找不到：                （这里的用什么代码最好？）

				]]></description>

				</item>
<item>

				<title>怎么给变量赋，系统的时间？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678296</link>

  				<author>wqjwftcaqr</author>
  				<pubDate>2010-03-17 14:53:42</pubDate>
				<description><![CDATA[

				作者: wqjwftcaqr

				发表于: 2010-03-17 14:53:42 (GMT 8)

				简介：比如，现在是几点几分，就给变量赋这个值？

				]]></description>

				</item>
<item>

				<title>django数据模型修改后同步的问题 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678229</link>

  				<author>qing8932087</author>
  				<pubDate>2010-03-17 12:53:12</pubDate>
				<description><![CDATA[

				作者: qing8932087

				发表于: 2010-03-17 12:53:12 (GMT 8)

				简介：[code]from django.db import models

class Message(models.Model):
    name = models.CharField(max_length = 30)
    email = models.EmailField()
    title = models.CharField(max_length = 200)
    c

				]]></description>

				</item>
<item>

				<title>ubuntu安装pydev的问题 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678150</link>

  				<author>soscu123</author>
  				<pubDate>2010-03-17 11:04:09</pubDate>
				<description><![CDATA[

				作者: soscu123

				发表于: 2010-03-17 11:04:09 (GMT 8)

				简介：我是ubuntu 9.10
JRE 1.6.0_15

安装pydev 1.5.5/1.5.0 后选择Windows > Preferences > Pydev出现错误
“[color=Red]Unable to create the selected preference page[/color]”

请教高人怎么解决呢？

				]]></description>

				</item>
<item>

				<title>招兼职python讲师 </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678127</link>

  				<author>hehe1314521</author>
  				<pubDate>2010-03-17 10:37:24</pubDate>
				<description><![CDATA[

				作者: hehe1314521

				发表于: 2010-03-17 10:37:24 (GMT 8)

				简介：本公司现招python兼职培训讲师，待遇

优，可周末，有意者请联系我

QQ:496397940，邮

件:hailang869@163.com

				]]></description>

				</item>
<item>

				<title>正则表达式求助？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1678104</link>

  				<author>wqjwftcaqr</author>
  				<pubDate>2010-03-17 10:19:14</pubDate>
				<description><![CDATA[

				作者: wqjwftcaqr

				发表于: 2010-03-17 10:19:14 (GMT 8)

				简介：Publication number:</span></td>(.*)</td>
意思是从(.*)后面，到第一个出现的</td>，怎么表示？
我不想要最后一个出现的</td>。

				]]></description>

				</item>
<item>

				<title>初学，按书上的意思写了一段，结果和正确答案不一样，我错在哪了呢？ </title>

				<link>http://bbs.chinaunix.net/viewthread.php?tid=1677987</link>

  				<author>mrfox</author>
  				<pubDate>2010-03-16 21:33:31</pubDate>
				<description><![CDATA[

				作者: mrfox

				发表于: 2010-03-16 21:33:31 (GMT 8)

				简介：书上的例子是要写一个猜数程序，我写的代码如下
print ("welcome!")
g=input("guess the number:")
guess=int(g)
while guess!=5:
    if guess>5:
        print("too high")
    else:
        print("too low")
else:
    pri

				]]></description>

				</item>
</channel>
</rss>