<?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>YourLai 摘记 &#187; Python</title>
	<atom:link href="http://www.yourlai.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yourlai.com</link>
	<description>初从文，三年不中。遂习武，校场发一矢，中鼓吏，逐之出。后学医，有所成，自撰一良方，服之，卒……</description>
	<lastBuildDate>Thu, 05 Jan 2012 11:38:46 +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>利用transset-df设置非活动窗口透明</title>
		<link>http://www.yourlai.com/2009/11/%e5%88%a9%e7%94%a8transset-df%e8%ae%be%e7%bd%ae%e9%9d%9e%e6%b4%bb%e5%8a%a8%e7%aa%97%e5%8f%a3%e9%80%8f%e6%98%8e/</link>
		<comments>http://www.yourlai.com/2009/11/%e5%88%a9%e7%94%a8transset-df%e8%ae%be%e7%bd%ae%e9%9d%9e%e6%b4%bb%e5%8a%a8%e7%aa%97%e5%8f%a3%e9%80%8f%e6%98%8e/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 00:39:29 +0000</pubDate>
		<dc:creator>YourLai</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.yourlai.com/?p=132</guid>
		<description><![CDATA[<a href="http://www.yourlai.com/2009/11/%e5%88%a9%e7%94%a8transset-df%e8%ae%be%e7%bd%ae%e9%9d%9e%e6%b4%bb%e5%8a%a8%e7%aa%97%e5%8f%a3%e9%80%8f%e6%98%8e/" title="利用transset-df设置非活动窗口透明"></a>[ad] #!/usr/bin/python -OO import os import re import time #wait for XServer to start time.sleep(5) strp = "[0][x][0-9a-fA-F]+" p = re.compile(strp) ## Get opened windows ids winids = os.popen('xprop -root &#124; grep "_NET_CLIENT_LIST(WINDOW):"').readlines() ids = ",".join(winids) winids = p.findall(ids) ## &#8230;<p class="read-more"><a href="http://www.yourlai.com/2009/11/%e5%88%a9%e7%94%a8transset-df%e8%ae%be%e7%bd%ae%e9%9d%9e%e6%b4%bb%e5%8a%a8%e7%aa%97%e5%8f%a3%e9%80%8f%e6%98%8e/">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.yourlai.com/2009/11/%e5%88%a9%e7%94%a8transset-df%e8%ae%be%e7%bd%ae%e9%9d%9e%e6%b4%bb%e5%8a%a8%e7%aa%97%e5%8f%a3%e9%80%8f%e6%98%8e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>处理Panabit的url日志</title>
		<link>http://www.yourlai.com/2009/10/%e5%a4%84%e7%90%86panabit%e7%9a%84url%e6%97%a5%e5%bf%97/</link>
		<comments>http://www.yourlai.com/2009/10/%e5%a4%84%e7%90%86panabit%e7%9a%84url%e6%97%a5%e5%bf%97/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 10:49:43 +0000</pubDate>
		<dc:creator>YourLai</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.yourlai.com/?p=124</guid>
		<description><![CDATA[<a href="http://www.yourlai.com/2009/10/%e5%a4%84%e7%90%86panabit%e7%9a%84url%e6%97%a5%e5%bf%97/" title="处理Panabit的url日志"></a>[ad] 这个是初始版本 先用syslog记录日志 然后用awk把url记录拿出来 接下来用python处理，把处理结果放在sqlite3数据库里面，sqlite3数据库有两个表 domain（domainID，domian，count） url（urlID，domainID，url，count） import os import re import sqlite3 logfile = open('tmplog','r') conn = sqlite3.connect("panabitlog.db3") cur = conn.cursor() conn.text_factory=str conn.execute("delete from domain") conn.execute("delete from url") strp1 = "[\w-]*\.[com&#124;cn&#124;org&#124;net&#124;gov&#124;cc]*[\.cn&#124;\.hk]*[\/&#124;:]" #strp1 = "\/\/[\w*\.]+\w*[:\d*]*\/" p = re.compile(strp1) i = &#8230;<p class="read-more"><a href="http://www.yourlai.com/2009/10/%e5%a4%84%e7%90%86panabit%e7%9a%84url%e6%97%a5%e5%bf%97/">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.yourlai.com/2009/10/%e5%a4%84%e7%90%86panabit%e7%9a%84url%e6%97%a5%e5%bf%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

