<?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>Nine Rivers &#187; Python</title>
	<atom:link href="http://9rivers.linkka.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://9rivers.linkka.com</link>
	<description>Molecular modeling in Materials Sciences Web development Programming IT</description>
	<lastBuildDate>Fri, 02 Dec 2011 06:20:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Chinese character display with VPtyhon</title>
		<link>http://9rivers.linkka.com/2011/11/15/chinese-character-display-with-vptyhon/</link>
		<comments>http://9rivers.linkka.com/2011/11/15/chinese-character-display-with-vptyhon/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 08:38:12 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[软件应用]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=640</guid>
		<description><![CDATA[VPython到底能不能显示中文字符？能显示哪些中文字体？下面的code给出答案。 123456789101112131415from visual import * label&#40;pos=&#40;0,0,0&#41;, text=u'测试'&#41; #print shapes.findSystemFonts() #pl = shapes.text(text=u'测试') #凡是ttf字体文件用windows字体查看器查看typeface name不乱码的（显示中文）字体都可以使用 text&#40;text=u'中文', align='center', depth=-0.3, color=color.green, font=u'C:\\WINDOWS\\Fonts\\simkai.ttf'&#41; text&#40;text=u'字体', align='center', depth=-0.3, color=color.yellow, font=u'C:\\WINDOWS\\Fonts\\msyh.ttf',pos=&#40;0,-1,0&#41;,height=0.5&#41; text&#40;text=u'字体', align='left', depth=-0.3, color=color.red, font=u'C:\\WINDOWS\\Fonts\\jianhuangcao.ttf',pos=&#40;0,-1,0&#41;&#41; 可见VPython不仅支持中文3D字体生成，而且也支持不同字体。但是我发现并不是所有中文字体都能使用，至少在我的英文版WinXP上是这样。一个技巧是，在windows中双击字体ttf文件用字体查看器查看字体，如果显示的typeface name是正确的中文字符，那么这个字体可以使用，如果是乱码则不能。 最近VPython又加入了extrusion的功能，因此生成的中文字形也可以经过挤出形成其它复杂造型，会有很多不同用途。]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2011/11/15/chinese-character-display-with-vptyhon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Python modules as non-root user on HPC cluster</title>
		<link>http://9rivers.linkka.com/2011/11/10/install-python-modules-as-non-root-user-on-hpc-cluster/</link>
		<comments>http://9rivers.linkka.com/2011/11/10/install-python-modules-as-non-root-user-on-hpc-cluster/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 01:41:33 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[Modeling & Simulation]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[mdanalysis]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=632</guid>
		<description><![CDATA[The key steps 1. Create a folder named &#8220;~/python-packages&#8221;, then create a path &#8220;~/python-packages/lib/python2.6/site-packages/&#8221; with 1mkdir -p python-packages/lib/python2.6/site-packages/ The above path containing the version number of Python should be adjust accordingly base on the actual Python version you are using. This step sets up a directory structure that is needed by python modules. 2. Next, [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2011/11/10/install-python-modules-as-non-root-user-on-hpc-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python initial script for Qtiplot</title>
		<link>http://9rivers.linkka.com/2010/11/23/python-initial-script-for-qtiplot/</link>
		<comments>http://9rivers.linkka.com/2010/11/23/python-initial-script-for-qtiplot/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 14:25:58 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[软件应用]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Qtiplot]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=585</guid>
		<description><![CDATA[OK, even after reading the handbook a few times, it is not very clear which python file is the initial script for Qtiplot. It is important to know if you want to extend Qtiplot with python. After checking all the default python files in the Qtiplot installation path, I found qtiplotrc.py should be the one, [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/11/23/python-initial-script-for-qtiplot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animation with matplotlib</title>
		<link>http://9rivers.linkka.com/2010/09/11/animation-with-matplotlib/</link>
		<comments>http://9rivers.linkka.com/2010/09/11/animation-with-matplotlib/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 23:46:35 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[Articles in English]]></category>
		<category><![CDATA[My work]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Matplotlib]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=561</guid>
		<description><![CDATA[A demo program showing the way to make animation with matplotlib. 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556# A demo for animation with matplotlib # Written by Ting Li (Dr.Ting.Li at gmail.com) # 2010-09-10 # Ref: http://www.scipy.org/Cookbook/Matplotlib/Animations import numpy as np import time import matplotlib matplotlib.use&#40;'WXAgg'&#41; #before import pylab, choose the GUI backend #It can also be done while calling this [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/09/11/animation-with-matplotlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>评书吧批量下载脚本</title>
		<link>http://9rivers.linkka.com/2010/08/05/%e8%af%84%e4%b9%a6%e5%90%a7%e6%89%b9%e9%87%8f%e4%b8%8b%e8%bd%bd%e8%84%9a%e6%9c%ac/</link>
		<comments>http://9rivers.linkka.com/2010/08/05/%e8%af%84%e4%b9%a6%e5%90%a7%e6%89%b9%e9%87%8f%e4%b8%8b%e8%bd%bd%e8%84%9a%e6%9c%ac/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 22:32:16 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[互联网编程]]></category>
		<category><![CDATA[爱好]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=513</guid>
		<description><![CDATA[通常只要修改Page_name和total_pages即可实现自动换页批量下载，喜欢听书的朋友可以试试。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204#coding=utf8 # Author: Ting Li 2010-08 import httplib, sys, time import HTMLParser global download_links download_links=&#91;&#93; # request the page def GetUrl&#40;ServerAdr,PagePath, Page&#41;: # &#160; &#160;print ServerAdr,PagePath &#160; &#160; conn = httplib.HTTPConnection&#40;ServerAdr&#41; &#160; &#160; conn.request&#40;'GET',PagePath+Page&#41; # &#160; &#160;print conn # &#160; &#160;conn.putrequest('GET', PagePath) # &#160; &#160;conn.putheader('Accept', 'text/html') &#160; # &#160; &#160;conn.endheaders() # &#160; &#160;conn.send(&#34;&#34;) &#160; [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/08/05/%e8%af%84%e4%b9%a6%e5%90%a7%e6%89%b9%e9%87%8f%e4%b8%8b%e8%bd%bd%e8%84%9a%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hide the command console window while running a GUI/Command line program on Windows</title>
		<link>http://9rivers.linkka.com/2010/07/29/hide-the-command-console-window-while-running-a-guicommand-line-program-on-windows/</link>
		<comments>http://9rivers.linkka.com/2010/07/29/hide-the-command-console-window-while-running-a-guicommand-line-program-on-windows/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 17:39:35 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Eric4]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=504</guid>
		<description><![CDATA[While running a command line program or some GUI initiated from command line on Windows, there is always a black console window on the screen. This sometime becomes annoying. For example, when you start the Eric Python IDE on Windows, normally you start it by calling a batch file &#8220;eric4.bat&#8221; which calls the actual eric4.py [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/07/29/hide-the-command-console-window-while-running-a-guicommand-line-program-on-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Python模块的反安装</title>
		<link>http://9rivers.linkka.com/2010/03/07/python%e6%a8%a1%e5%9d%97%e7%9a%84%e5%8f%8d%e5%ae%89%e8%a3%85/</link>
		<comments>http://9rivers.linkka.com/2010/03/07/python%e6%a8%a1%e5%9d%97%e7%9a%84%e5%8f%8d%e5%ae%89%e8%a3%85/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 22:23:58 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[软件应用]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=372</guid>
		<description><![CDATA[Python的distutils可以很方便地制作模块安装程序，但是没有提供反安装/卸载功能。 可以通过一个trick来实现反安装： 首先，安装模块时使用“&#8211;record” 参数把所安装文件记录到一个文件中 python setup.py install &#8211;record files.txt 然后通过这个“反安装文件”来卸载： cat files.txt &#124; xargs rm -rf 事实上这仅仅相当于手工删除，但是不失为一个解决办法。个人以为，Python的包管理系统很完善，期待更强的包管理器出现。 参考：http://kmandla.wordpress.com/2009/01/08/there-is-no-setuppy-uninstall/]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/03/07/python%e6%a8%a1%e5%9d%97%e7%9a%84%e5%8f%8d%e5%ae%89%e8%a3%85/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PiCloud 基于Python的云计算平台</title>
		<link>http://9rivers.linkka.com/2010/03/06/picloud-bring-python-on-cloud/</link>
		<comments>http://9rivers.linkka.com/2010/03/06/picloud-bring-python-on-cloud/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 15:32:29 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[爱好]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[软件应用]]></category>
		<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=361</guid>
		<description><![CDATA[云计算是当今一个热门的名词，也是众多计算机软硬件提供商急于从中挖掘利润的新兴服务。不过除了少数几家公司，如Amazon，实现了基础平台以外，提供具体SaaS应用的并不多。PiCloud是个有趣的公司，从它UC Berkeley的背景可以感觉到它的出现具有很强的实验特征，也就是说是探索云计算概念的实际商业价值。 简单说，PiCloud提供了一个基于Python环境的软件平台，最大可能地简化客户执行任务的流程，使得客户可以几乎立即在云计算的硬件平台上运行自己已有的应用程序。之所以觉得它有趣，是PiCloud既没有自己的硬件平台，也不为客户提供定制的应用程序，因此它还是属于平台提供商。但是它有着自己独特的角色，它以Amazon Web Services为云计算的基础平台，构建了包括任务提交、管理等软件功能，极大地简化客户需要使用云计算平台的流程，例如繁琐的服务器配置或软件安装。Python的强大功能和简易编程的能力，对PiCloud的实现起到重要的推动作用。 根据PiCloud的介绍，用户最少可以仅仅使用三条语句cloud.call(), cloud.status(), cloud.result()即可实现任务的提交，监视和结果获取。其中call（）名利可以直接传输一个Python函数给服务器。在服务器端，PiCloud一定有一个比较完善的软件环境，用来管理用户提交的任务。不过云计算提供商应该已经提供了负载均衡和任务迁移等功能，因此PiCould后台的软件应该只是对硬件平台提供商提供的接口的简单封装。 对于一个公司，最重要的还是看商业价值。我觉得PiCould提供的报价虽不高，但是他的角色很容易被云计算的硬件提供商所取代（因为那些基础平台提供商也有降低用户使用门槛的愿望）。个人觉得PiCloud的出路在于，要么为用户提供特殊服务（定制化的），要么就要和某些平台提供商结为联盟，保证各取所需。（这和手机平台和应用提供商的关系是很类似的） 转载请注明出处！]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/03/06/picloud-bring-python-on-cloud/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Print directory tree on Windows and Linux using tree, sed, awk or Python</title>
		<link>http://9rivers.linkka.com/2010/02/10/print-directory-tree-on-windows-and-linux-using-tree-sed-awk-or-python/</link>
		<comments>http://9rivers.linkka.com/2010/02/10/print-directory-tree-on-windows-and-linux-using-tree-sed-awk-or-python/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 12:24:20 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[AWK]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Sed]]></category>
		<category><![CDATA[tree]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=344</guid>
		<description><![CDATA[Windows: there is &#8216;tree.com&#8216; command showing the directory structure. http://chxkyy.javaeye.com/blog/213864 Linux: there is a &#8216;tree&#8216; program for Linux and also available on some Linux distributions, such as Debian. (apt-get install tree) http://www.debian-administration.org/article/Commands_you_might_have_missed_tree Sed or Awk: The Sed version: http://www.centerkey.com/tree/ The AWK version: http://www.unix.com/shell-programming-scripting/50806-directory-tree.html 1find . -type d -print 2&#38;gt;/dev/null&#124;awk '!/\.$/ {for(i=1;i&#38;lt; 5 &#160;&#38;amp;&#38;amp; i != [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/02/10/print-directory-tree-on-windows-and-linux-using-tree-sed-awk-or-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH tunneling and example Python client-server codes</title>
		<link>http://9rivers.linkka.com/2010/02/05/ssh-tunneling-and-example-python-client-server-codes/</link>
		<comments>http://9rivers.linkka.com/2010/02/05/ssh-tunneling-and-example-python-client-server-codes/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 15:05:18 +0000</pubDate>
		<dc:creator>9rivers</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://9rivers.linkka.com/?p=335</guid>
		<description><![CDATA[This document demonstrates how we could run client-server software via SSH. The main purpose of using this technique relies on that on most HPC servers most of the IP ports are nromally blocked except for the SSH port 22. SSH tunneling settings in PuTTY In this case, the server port 8888 is mapped to the [...]]]></description>
		<wfw:commentRss>http://9rivers.linkka.com/2010/02/05/ssh-tunneling-and-example-python-client-server-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

