<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mr. YoxYue &#187; Python</title>
	<atom:link href="http://yoxyue.cn/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://yoxyue.cn</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 17:06:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>py2exe打包python程序</title>
		<link>http://yoxyue.cn/2008/07/29/193</link>
		<comments>http://yoxyue.cn/2008/07/29/193#comments</comments>
		<pubDate>Tue, 29 Jul 2008 15:24:54 +0000</pubDate>
		<dc:creator>YoxYue</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://shawnyue.net/?p=193</guid>
		<description><![CDATA[今天用wxPython写了个测试程序，然后用py2exe打包，结果总是跳出dos窗口来，而且dist目录里面乱七八糟生成了一大堆。从py2exe官方看了个样例，可以打成1个文件，而且不出dos窗口了。 from distutils.... ]]></description>
			<content:encoded><![CDATA[<p>今天用wxPython写了个测试程序，然后用py2exe打包，结果总是跳出dos窗口来，而且dist目录里面乱七八糟生成了一大堆。从py2exe官方看了个样例，可以打成1个文件，而且不出dos窗口了。<br />
<coolcode lang="python"><br />
from distutils.core import setup<br />
import py2exe, sys, os</p>
<p>sys.argv.append(&#8216;py2exe&#8217;)</p>
<p>setup(<br />
    options = {&#8216;py2exe&#8217;: {&#8216;bundle_files&#8217;: 1}},<br />
    windows = [{'script': "test.py"}],<br />
    zipfile = None,<br />
)<br />
</coolcode><br />
然后可以用InnoSetup打个包，我用的是汉化版的可以从<a href="http://www.newhua.com/soft/4693.htm" target=_blank>华军</a>下载<br />
就是用wxPython打包的库太多,一个窗口的HelloWorld压缩完了都3MB多,那个寒啊~</p>
<h3  class="related_post_title">您可能感兴趣的内容</h3><ul class="related_post"><li>2008年07月25日 -- <a href="http://yoxyue.cn/2008/07/25/178" title="python操作excel小实验">python操作excel小实验</a> (0)</li><li>2008年07月22日 -- <a href="http://yoxyue.cn/2008/07/22/170" title="Windows下Python开发常用工具">Windows下Python开发常用工具</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://yoxyue.cn/2008/07/29/193/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python操作excel小实验</title>
		<link>http://yoxyue.cn/2008/07/25/178</link>
		<comments>http://yoxyue.cn/2008/07/25/178#comments</comments>
		<pubDate>Thu, 24 Jul 2008 16:03:58 +0000</pubDate>
		<dc:creator>YoxYue</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://shawnyue.net/?p=178</guid>
		<description><![CDATA[朋友有需求从xls文件里面读取手机号，然后从文件夹里将文件名含有对应手机号的文件复制到新文件夹中，没有对应文件的手机号记录到txt文件中.功能很简单,主要是演示操作方法.xlrd主页 import... ]]></description>
			<content:encoded><![CDATA[<p>朋友有需求从xls文件里面读取手机号，然后从文件夹里将文件名含有对应手机号的文件复制到新文件夹中，没有对应文件的手机号记录到txt文件中.功能很简单,主要是演示操作方法.<a href="http://www.lexicon.net/sjmachin/xlrd.htm" target=_blank>xlrd主页</a><br />
<coolcode lang="python"><br />
import xlrd,re,shutil,os<br />
book=xlrd.open_workbook(&#8220;i:\\demo.xls&#8221;)<br />
sh=book.sheet_by_index(0)<br />
nrows=sh.nrows<br />
path=&#8221;i:\\filespath&#8221;<br />
outpath=&#8221;i:\\outpath&#8221;<br />
for rx in range(nrows):<br />
        mp = sh.row(rx)<br />
        for file in os.listdir(path):<br />
            p,f=os.path.split(file)<br />
            a,b=f.split(&#8216;.&#8217;)<br />
            if a[-11:] in str(mp):<br />
                shutil.copy(path+&#8221;\\&#8221;+f,outpath)<br />
            else:<br />
                myfile=open(&#8216;NotFindfiles.txt&#8217;,'w&#8217;)<br />
                myfile.write(a[-11:]+&#8217;\n&#8217;)<br />
                myfile.close()<br />
</coolcode></p>
<h3  class="related_post_title">您可能感兴趣的内容</h3><ul class="related_post"><li>2008年07月29日 -- <a href="http://yoxyue.cn/2008/07/29/193" title="py2exe打包python程序">py2exe打包python程序</a> (0)</li><li>2008年07月22日 -- <a href="http://yoxyue.cn/2008/07/22/170" title="Windows下Python开发常用工具">Windows下Python开发常用工具</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://yoxyue.cn/2008/07/25/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows下Python开发常用工具</title>
		<link>http://yoxyue.cn/2008/07/22/170</link>
		<comments>http://yoxyue.cn/2008/07/22/170#comments</comments>
		<pubDate>Mon, 21 Jul 2008 16:08:18 +0000</pubDate>
		<dc:creator>YoxYue</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://shawnyue.net/?p=170</guid>
		<description><![CDATA[自从SF被封以后下载工具都不方便了，收集了些我常用的Python内容。不断更新中 您可能感兴趣的内容2008年07月29日 -- py2exe打包python程序 (0)2008年07月25日 -- python操作excel小实验 (0... ]]></description>
			<content:encoded><![CDATA[<p><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-1d9b2185653da895.skydrive.live.com/embedrowdetail.aspx/Python"></iframe><br />
自从SF被封以后下载工具都不方便了，收集了些我常用的Python内容。不断更新中</p>
<h3  class="related_post_title">您可能感兴趣的内容</h3><ul class="related_post"><li>2008年07月29日 -- <a href="http://yoxyue.cn/2008/07/29/193" title="py2exe打包python程序">py2exe打包python程序</a> (0)</li><li>2008年07月25日 -- <a href="http://yoxyue.cn/2008/07/25/178" title="python操作excel小实验">python操作excel小实验</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://yoxyue.cn/2008/07/22/170/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
