<?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>Systems Thoughts &#187; python</title>
	<atom:link href="http://blog.systemsthoughts.com/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.systemsthoughts.com</link>
	<description>关于IT，技术，互联网及其他，中国人在瑞典。About IT, technology and lots more. A Chinese in Sweden.</description>
	<lastBuildDate>Tue, 02 Mar 2010 15:40:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>在Google App Engine SDK里运行web2py</title>
		<link>http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html</link>
		<comments>http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html#comments</comments>
		<pubDate>Tue, 02 Mar 2010 15:40:43 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[小技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[web2py]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[计算机]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/?p=683</guid>
		<description><![CDATA[论坛上所有人都在感叹，web2py对GAE的支持太他妈好了，搞得我也心痒痒的，今天试了一下，首先看到web2py包里有个app.yaml，还一阵小鸡冻，结果接下来怎么也整不起来。运行倒是可以，就是在浏览器里访问不了。加上我主机所在地inmotionhosting的mod_python有点问题，搞得很郁闷。搜索了一下午终于发现一个傻子小弟和我遇到问题一样，然后web2py的作者Massimo Di Pierro（总觉得这哥们是机器人，一天24小时不带睡觉回答问题，网上到处都有他的影子。然后还不停的更新web2py文档和程序，佩服，肯定没有女朋友:P）问他用的是不是Python2.6，原来GAE只能用2.5。我靠，顿时茅厕顿开！立马拖了一个Python2.5下来，在dev_appserver.py里第一行加上2.5，一跑，成了。web2py真实太伟大了。


Related posts:打开web2py的远程访问
Py2exe编译Pywinauto程序
给Squid添加密码验证



Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html' rel='bookmark' title='Permanent Link: Py2exe编译Pywinauto程序'>Py2exe编译Pywinauto程序</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/02/%e7%bb%99squid%e6%b7%bb%e5%8a%a0%e5%af%86%e7%a0%81%e9%aa%8c%e8%af%81.html' rel='bookmark' title='Permanent Link: 给Squid添加密码验证'>给Squid添加密码验证</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>论坛上所有人都在感叹，web2py对GAE的支持太他妈好了，搞得我也心痒痒的，今天试了一下，首先看到web2py包里有个app.yaml，还一阵小鸡冻，结果接下来怎么也整不起来。运行倒是可以，就是在浏览器里访问不了。加上我主机所在地inmotionhosting的mod_python有点问题，搞得很郁闷。搜索了一下午终于发现一个傻子小弟和我遇到问题一样，然后web2py的作者Massimo Di Pierro（总觉得这哥们是机器人，一天24小时不带睡觉回答问题，网上到处都有他的影子。然后还不停的更新web2py文档和程序，佩服，肯定没有女朋友:P）问他用的是不是Python2.6，原来GAE只能用2.5。我靠，顿时茅厕顿开！立马拖了一个Python2.5下来，在dev_appserver.py里第一行加上2.5，一跑，成了。web2py真实太伟大了。</p>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html' rel='bookmark' title='Permanent Link: Py2exe编译Pywinauto程序'>Py2exe编译Pywinauto程序</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/02/%e7%bb%99squid%e6%b7%bb%e5%8a%a0%e5%af%86%e7%a0%81%e9%aa%8c%e8%af%81.html' rel='bookmark' title='Permanent Link: 给Squid添加密码验证'>给Squid添加密码验证</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>打开web2py的远程访问</title>
		<link>http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html</link>
		<comments>http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html#comments</comments>
		<pubDate>Thu, 21 Jan 2010 11:05:48 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[小技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[web2py]]></category>
		<category><![CDATA[开发]]></category>
		<category><![CDATA[技巧]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/?p=567</guid>
		<description><![CDATA[


今天想把这个搞定，突然发现中文资料少的可怜，所有的文章都是“转载”于一个人，无非就是用Putty里的ssh隧道功能。其实人家说了，必须开https才能远程访问。
运行python web2py.py &#8211;help，参数表中关于ssl的有:
-c SSL_CERTIFICATE, &#8211;ssl_certificate=SSL_CERTIFICATE
file that contains ssl certificate
-k SSL_PRIVATE_KEY, &#8211;ssl_private_key=SSL_PRIVATE_KEY
file that contains ssl private key
看来只要有证书就可以打开ssl连接，参考这篇文章。如果没有其他服务要用这个证书的话，完全可以放在web2py目录里。执行以下命令：
$openssl genrsa -des3 -out server.key 1024
然后输入密码产生一个server.key文件
$ openssl req -new -key server.key -out server.csr
接下来输入一些问题，产生证书，然后就该签名了
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
期间要输入你以前输入的密码。
到这里你就生成了密钥和证书，只要在web2py里把他们载入就可以了。
python web2.py &#8211; -ip=xxx.xxx.xxx.xxx  - -port==xxxx &#8211; -password=***** -c server.crt -k server.key
启动后还会问你密钥密码，然后从浏览器里访问https://ip:port/就成了。web2py真强大！


Related posts:在Google App Engine SDK里运行web2py
Python 2.6.2 subprocess在linux下不能传递参数的处理
SCIM在Arch [...]


Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
<li><a href='http://blog.systemsthoughts.com/2008/10/scim%e5%9c%a8arch-linux%e4%b8%8b%e7%9a%84%e6%ad%a3%e7%a1%ae%e8%ae%be%e7%bd%ae%e6%96%b9%e6%b3%95.html' rel='bookmark' title='Permanent Link: SCIM在Arch Linux下的正确设置方法'>SCIM在Arch Linux下的正确设置方法</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-5008995866388592";
google_ad_slot = "3387257388";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
今天想把这个搞定，突然发现中文资料少的可怜，所有的文章都是“转载”于一个人，无非就是用Putty里的ssh隧道功能。其实人家说了，必须开https才能远程访问。</p>
<p>运行python web2py.py &#8211;help，参数表中关于ssl的有:</p>
<div class="codesnip-container" >-c SSL_CERTIFICATE, &#8211;ssl_certificate=SSL_CERTIFICATE<br />
file that contains ssl certificate<br />
-k SSL_PRIVATE_KEY, &#8211;ssl_private_key=SSL_PRIVATE_KEY<br />
file that contains ssl private key</div>
<p>看来只要有证书就可以打开ssl连接，参考这篇<a href="http://blog.i4pace.net/frog/user/Teru/article/2009-04-06/72">文章</a>。如果没有其他服务要用这个证书的话，完全可以放在web2py目录里。执行以下命令：</p>
<div class="codesnip-container" >$openssl genrsa -des3 -out server.key 1024<br />
然后输入密码产生一个server.key文件<br />
$ openssl req -new -key server.key -out server.csr<br />
接下来输入一些问题，产生证书，然后就该签名了<br />
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt<br />
期间要输入你以前输入的密码。<br />
到这里你就生成了密钥和证书，只要在web2py里把他们载入就可以了。</div>
<p>python web2.py &#8211; -ip=xxx.xxx.xxx.xxx  - -port==xxxx &#8211; -password=***** -c server.crt -k server.key<br />
启动后还会问你密钥密码，然后从浏览器里访问https://ip:port/就成了。web2py真强大！</p>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
<li><a href='http://blog.systemsthoughts.com/2008/10/scim%e5%9c%a8arch-linux%e4%b8%8b%e7%9a%84%e6%ad%a3%e7%a1%ae%e8%ae%be%e7%bd%ae%e6%96%b9%e6%b3%95.html' rel='bookmark' title='Permanent Link: SCIM在Arch Linux下的正确设置方法'>SCIM在Arch Linux下的正确设置方法</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python 2.6.2 subprocess在linux下不能传递参数的处理</title>
		<link>http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html</link>
		<comments>http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html#comments</comments>
		<pubDate>Fri, 20 Nov 2009 12:58:40 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[subprocess]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/?p=538</guid>
		<description><![CDATA[好长的标题&#8230;我有一个控制Vmware虚拟机的脚本，但是在Windows下正常在Linux下却不能用，当然我不能忍受Windows下虚拟机的速度。
出错的地方在这里:

p = subprocess.Popen&#40;&#91;&#34;vmrun&#34;, params&#93;, shell = True, stdout=subprocess.PIPE&#41;

然后params不能传到vmrun这个命令，虚拟机跑不起来。后来Google了一下，发现是个Bug. 只要把/usr/lib/python-2.6.2/Lib/subprocess.py里第990行改成

args = &#91;&#34;/bin/sh&#34;, &#34;-c&#34;&#93; + &#91;&#34; &#34;.join&#40;args&#41;&#93;

就好了。可是我找了半天没找到Ubuntu下Python的test目录在哪里，test_subprocess.py找不到。。。


Related posts:打开web2py的远程访问
在后台运行Python脚本服务
Ubuntu下欧洲键盘和输入法的配置



Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/09/%e5%9c%a8%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac%e6%9c%8d%e5%8a%a1.html' rel='bookmark' title='Permanent Link: 在后台运行Python脚本服务'>在后台运行Python脚本服务</a></li>
<li><a href='http://blog.systemsthoughts.com/2008/08/ubuntu%e4%b8%8b%e6%ac%a7%e6%b4%b2%e9%94%ae%e7%9b%98%e5%92%8c%e8%be%93%e5%85%a5%e6%b3%95%e7%9a%84%e9%85%8d%e7%bd%ae.html' rel='bookmark' title='Permanent Link: Ubuntu下欧洲键盘和输入法的配置'>Ubuntu下欧洲键盘和输入法的配置</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>好长的标题&#8230;我有一个控制Vmware虚拟机的脚本，但是在Windows下正常在Linux下却不能用，当然我不能忍受Windows下虚拟机的速度。<br />
出错的地方在这里:</p>
<div class="codesnip-container" >
<div class="python codesnip" style="font-family:monospace;">p = <span class="kw3">subprocess</span>.<span class="me1">Popen</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="st0">&quot;vmrun&quot;</span>, params<span class="br0">&#93;</span>, shell = <span class="kw2">True</span>, stdout=<span class="kw3">subprocess</span>.<span class="me1">PIPE</span><span class="br0">&#41;</span></div>
</div>
<p>然后params不能传到vmrun这个命令，虚拟机跑不起来。后来Google了一下，发现是个<a href="http://bugs.python.org/issue6689" target="_blank">Bug</a>. 只要把/usr/lib/python-2.6.2/Lib/subprocess.py里第990行改成</p>
<div class="codesnip-container" >
<div class="python codesnip" style="font-family:monospace;">args = <span class="br0">&#91;</span><span class="st0">&quot;/bin/sh&quot;</span>, <span class="st0">&quot;-c&quot;</span><span class="br0">&#93;</span> + <span class="br0">&#91;</span><span class="st0">&quot; &quot;</span>.<span class="me1">join</span><span class="br0">&#40;</span>args<span class="br0">&#41;</span><span class="br0">&#93;</span></div>
</div>
<p>就好了。可是我找了半天没找到Ubuntu下Python的test目录在哪里，test_subprocess.py找不到。。。</p>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/09/%e5%9c%a8%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac%e6%9c%8d%e5%8a%a1.html' rel='bookmark' title='Permanent Link: 在后台运行Python脚本服务'>在后台运行Python脚本服务</a></li>
<li><a href='http://blog.systemsthoughts.com/2008/08/ubuntu%e4%b8%8b%e6%ac%a7%e6%b4%b2%e9%94%ae%e7%9b%98%e5%92%8c%e8%be%93%e5%85%a5%e6%b3%95%e7%9a%84%e9%85%8d%e7%bd%ae.html' rel='bookmark' title='Permanent Link: Ubuntu下欧洲键盘和输入法的配置'>Ubuntu下欧洲键盘和输入法的配置</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在后台运行Python脚本服务</title>
		<link>http://blog.systemsthoughts.com/2009/09/%e5%9c%a8%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac%e6%9c%8d%e5%8a%a1.html</link>
		<comments>http://blog.systemsthoughts.com/2009/09/%e5%9c%a8%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac%e6%9c%8d%e5%8a%a1.html#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:21:49 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[小技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/?p=515</guid>
		<description><![CDATA[最近写了个GTalk机器人，就一个脚本，但是我需要它24小时在服务器跑着，于是乎在网上搜不被ssh切断的方法。
你要是想python robot.py &#38; 是不行的，一旦用户登出，脚本就自动退出了。用at, cron也可以实现不过我发现了一个命令
nohup，可以忽略登出的信号，现在只要
nohup python robot.py &#38;
就好了。


Related posts:打开web2py的远程访问
Python 2.6.2 subprocess在linux下不能传递参数的处理
用Arch的Vmplayer感受MacOSx的威力 (1)



Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
<li><a href='http://blog.systemsthoughts.com/2008/10/%e7%94%a8arch%e7%9a%84vmplayer%e6%84%9f%e5%8f%97macosx%e7%9a%84%e5%a8%81%e5%8a%9b-1.html' rel='bookmark' title='Permanent Link: 用Arch的Vmplayer感受MacOSx的威力 (1)'>用Arch的Vmplayer感受MacOSx的威力 (1)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>最近写了个GTalk机器人，就一个脚本，但是我需要它24小时在服务器跑着，于是乎在网上搜不被ssh切断的方法。</p>
<p>你要是想python robot.py &amp; 是不行的，一旦用户登出，脚本就自动退出了。用at, cron也可以实现不过我发现了一个命令</p>
<p>nohup，可以忽略登出的信号，现在只要</p>
<p>nohup python robot.py &amp;<br />
就好了。</p>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
<li><a href='http://blog.systemsthoughts.com/2008/10/%e7%94%a8arch%e7%9a%84vmplayer%e6%84%9f%e5%8f%97macosx%e7%9a%84%e5%a8%81%e5%8a%9b-1.html' rel='bookmark' title='Permanent Link: 用Arch的Vmplayer感受MacOSx的威力 (1)'>用Arch的Vmplayer感受MacOSx的威力 (1)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2009/09/%e5%9c%a8%e5%90%8e%e5%8f%b0%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac%e6%9c%8d%e5%8a%a1.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Py2exe编译Pywinauto程序</title>
		<link>http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html</link>
		<comments>http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html#comments</comments>
		<pubDate>Tue, 02 Jun 2009 15:57:45 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[测试]]></category>
		<category><![CDATA[py2exe]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pywinauto]]></category>
		<category><![CDATA[技巧]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/?p=468</guid>
		<description><![CDATA[话说Pywinauto真是好用阿，不过有些脚本想给同事用他们要安装Python就有点麻烦了，用Py2exe编译出的程序运行时总提示有错误。今天花了点时间，原来Py2exe的脚本里有很多选项可以用。先写这一点吧。

from distutils.core import setup
import py2exe
setup&#40;console=&#91;&#8217;setup_vista32.py&#8217;&#93;,
options=&#123;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#34;py2exe&#34;:&#123;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#34;packages&#34;:
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#91;&#34;pywinauto&#34;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;pywinauto.findwindows&#34;,
&#160; [...]


Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>话说Pywinauto真是好用阿，不过有些脚本想给同事用他们要安装Python就有点麻烦了，用Py2exe编译出的程序运行时总提示有错误。今天花了点时间，原来Py2exe的脚本里有很多选项可以用。先写这一点吧。</p>
<div class="codesnip-container" >
<div class="python codesnip" style="font-family:monospace;"><span class="kw1">from</span> <span class="kw3">distutils</span>.<span class="me1">core</span> <span class="kw1">import</span> setup<br />
<span class="kw1">import</span> py2exe</p>
<p>setup<span class="br0">&#40;</span>console=<span class="br0">&#91;</span><span class="st0">&#8217;setup_vista32.py&#8217;</span><span class="br0">&#93;</span>,<br />
options=<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;py2exe&quot;</span>:<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;packages&quot;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#91;</span><span class="st0">&quot;pywinauto&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;pywinauto.findwindows&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;pywinauto.controls&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;pywinauto.tests&quot;</span><span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</div>
<p>以后再慢慢优化把垃圾去出去。</p>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>终于知道怎么调用Gstreamer放电影了</title>
		<link>http://blog.systemsthoughts.com/2008/04/%e7%bb%88%e4%ba%8e%e7%9f%a5%e9%81%93%e6%80%8e%e4%b9%88%e8%b0%83%e7%94%a8gstreamer%e6%94%be%e7%94%b5%e5%bd%b1%e4%ba%86.html</link>
		<comments>http://blog.systemsthoughts.com/2008/04/%e7%bb%88%e4%ba%8e%e7%9f%a5%e9%81%93%e6%80%8e%e4%b9%88%e8%b0%83%e7%94%a8gstreamer%e6%94%be%e7%94%b5%e5%bd%b1%e4%ba%86.html#comments</comments>
		<pubDate>Mon, 14 Apr 2008 22:34:26 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/2008/04/%e7%bb%88%e4%ba%8e%e7%9f%a5%e9%81%93%e6%80%8e%e4%b9%88%e8%b0%83%e7%94%a8gstreamer%e6%94%be%e7%94%b5%e5%bd%b1%e4%ba%86.html</guid>
		<description><![CDATA[想用Python做个视频播放器自己用呢，让Gstreamer这东西给困住了。网上文档大部分是讲播放音频的，弄得都特复杂。搞的我放一个AVI文件好像还得先查它是什么编码编的。差点就转向xine了，然后又差点把python放弃转向java&#8230;-_-!
不过就在刚才终于成功了，而且Audio/Video Sync的也很好。赶快记下来，以免明天忘了。
gst-launch-0.10 -v filesrc location=视频文件 ! decodebin name=d d. ! queue!  autovideosink d. ! queue ! audioconvert ! alsasink



Related posts:在Google App Engine SDK里运行web2py
Python 2.6.2 subprocess在linux下不能传递参数的处理
Py2exe编译Pywinauto程序



Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html' rel='bookmark' title='Permanent Link: Py2exe编译Pywinauto程序'>Py2exe编译Pywinauto程序</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>想用Python做个视频播放器自己用呢，让Gstreamer这东西给困住了。网上文档大部分是讲播放音频的，弄得都特复杂。搞的我放一个AVI文件好像还得先查它是什么编码编的。差点就转向xine了，然后又差点把python放弃转向java&#8230;-_-!</p>
<p>不过就在刚才终于成功了，而且Audio/Video Sync的也很好。赶快记下来，以免明天忘了。</p>
<blockquote><div class="codesnip-container" >gst-launch-0.10 -v filesrc location=视频文件 ! decodebin name=d d. ! queue!  autovideosink d. ! queue ! audioconvert ! alsasink</div>
</blockquote>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/06/py2exe-compile-pywinauto-script.html' rel='bookmark' title='Permanent Link: Py2exe编译Pywinauto程序'>Py2exe编译Pywinauto程序</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2008/04/%e7%bb%88%e4%ba%8e%e7%9f%a5%e9%81%93%e6%80%8e%e4%b9%88%e8%b0%83%e7%94%a8gstreamer%e6%94%be%e7%94%b5%e5%bd%b1%e4%ba%86.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Python的缩进真可怕</title>
		<link>http://blog.systemsthoughts.com/2007/07/python%e7%9a%84%e7%bc%a9%e8%bf%9b%e7%9c%9f%e5%8f%af%e6%80%95.html</link>
		<comments>http://blog.systemsthoughts.com/2007/07/python%e7%9a%84%e7%bc%a9%e8%bf%9b%e7%9c%9f%e5%8f%af%e6%80%95.html#comments</comments>
		<pubDate>Thu, 26 Jul 2007 23:56:34 +0000</pubDate>
		<dc:creator>linuxcity</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.systemsthoughts.com/2007/07/27/python%e7%9a%84%e7%bc%a9%e8%bf%9b%e7%9c%9f%e5%8f%af%e6%80%95/</guid>
		<description><![CDATA[昨晚学着写一个RSS Reader，结果写完了就是运行不了，摘下眼镜检查，戴上眼镜检查，没发现有什么错误，可就是运行不了。到最后都快放弃了，没事做把缩进都调整了一下，居然可以运行了，后来才发现，“一个语句块的界限，完全是由每行的首字符在这一行的位置来决定的”。最近玩高级，什么都用Vim写，结果为了省空格呼略格式，浪费了两小时~
Vim可能在字符界面下是最强大的吧。但是不可否认我学了一些命令后写东西已经脱离鼠标了，想哪打哪，它的搜索，删除，移动功能真是很爽~ 用Latex写完我人生第一篇.tex文章，直接生成pdf，漂亮！再也不用为了设那些乱七八糟的东西分神了~


Related posts:在Google App Engine SDK里运行web2py
打开web2py的远程访问
Python 2.6.2 subprocess在linux下不能传递参数的处理



Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>昨晚学着写一个RSS Reader，结果写完了就是运行不了，摘下眼镜检查，戴上眼镜检查，没发现有什么错误，可就是运行不了。到最后都快放弃了，没事做把缩进都调整了一下，居然可以运行了，后来才发现，“<a TARGET="_blank" HREF="http://zh.wikipedia.org/wiki/Python">一个语句块的界限，完全是由每行的首字符在这一行的位置来决定的</a>”。最近玩高级，什么都用Vim写，结果为了省空格呼略格式，浪费了两小时~</p>
<p>Vim可能在字符界面下是最强大的吧。但是不可否认我学了一些命令后写东西已经脱离鼠标了，想哪打哪，它的搜索，删除，移动功能真是很爽~ 用Latex写完我人生第一篇.tex文章，直接生成pdf，漂亮！再也不用为了设那些乱七八糟的东西分神了~</p>


<p>Related posts:<ol><li><a href='http://blog.systemsthoughts.com/2010/03/web2py-problem-in-google-app-engine-sdk.html' rel='bookmark' title='Permanent Link: 在Google App Engine SDK里运行web2py'>在Google App Engine SDK里运行web2py</a></li>
<li><a href='http://blog.systemsthoughts.com/2010/01/%e6%89%93%e5%bc%80web2py%e7%9a%84%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae.html' rel='bookmark' title='Permanent Link: 打开web2py的远程访问'>打开web2py的远程访问</a></li>
<li><a href='http://blog.systemsthoughts.com/2009/11/python-262-subprocess%e5%9c%a8linux%e4%b8%8b%e4%b8%8d%e8%83%bd%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%e7%9a%84%e5%a4%84%e7%90%86.html' rel='bookmark' title='Permanent Link: Python 2.6.2 subprocess在linux下不能传递参数的处理'>Python 2.6.2 subprocess在linux下不能传递参数的处理</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.systemsthoughts.com/2007/07/python%e7%9a%84%e7%bc%a9%e8%bf%9b%e7%9c%9f%e5%8f%af%e6%80%95.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
