<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>Ken's blog &#187; Python</title>
	<atom:link href="http://blog.sibrof.net/ken/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sibrof.net/ken</link>
	<description>The keyword is unisexy.</description>
	<lastBuildDate>Tue, 23 Mar 2010 09:53:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/tag/python/feed/" />
		<item>
		<title>Python ポケットリファレンス</title>
		<link>http://blog.sibrof.net/ken/2009/07/05/2278/</link>
		<comments>http://blog.sibrof.net/ken/2009/07/05/2278/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 11:59:17 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2278</guid>
		<description><![CDATA[
Python ポケットリファレンス
昨日買い忘れた一冊を購入。
]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.amazon.co.jp/dp/4774138053?tag=unisexyblog09-22&#038;camp=243&#038;creative=1615&#038;linkCode=as1&#038;creativeASIN=4774138053&#038;adid=1F67GQQ3VVZ341EG1CE9&#038;"><img src="https://images-na.ssl-images-amazon.com/images/I/51NNxQpJVZL._SL100_.jpg" alt="Python pocket reference" /></a><br />
Python ポケットリファレンス</p>
<p>昨日買い忘れた一冊を購入。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/07/05/2278/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/07/05/2278/" />
	</item>
		<item>
		<title>Pyinotifyなんてものがあった！</title>
		<link>http://blog.sibrof.net/ken/2009/06/24/2203/</link>
		<comments>http://blog.sibrof.net/ken/2009/06/24/2203/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 14:53:44 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[pyinotify]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2203</guid>
		<description><![CDATA[■Pyinotify
http://trac.dbzteam.org/pyinotify
こんな便利なものがあるじゃん！
今日はインストールだけしとくか。
sudo easy_install pyinotify
完了。
]]></description>
			<content:encoded><![CDATA[<p>■Pyinotify<br />
<a href="http://trac.dbzteam.org/pyinotify">http://trac.dbzteam.org/pyinotify</a><br />
こんな便利なものがあるじゃん！<br />
今日はインストールだけしとくか。</p>
<p>sudo easy_install pyinotify<br />
完了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/06/24/2203/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/06/24/2203/" />
	</item>
		<item>
		<title>py-kqueueがインストール出来ない</title>
		<link>http://blog.sibrof.net/ken/2009/06/23/2184/</link>
		<comments>http://blog.sibrof.net/ken/2009/06/23/2184/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:31:58 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[py-kqueue]]></category>
		<category><![CDATA[Ubuntu 9.04]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2184</guid>
		<description><![CDATA[py-kqueueという便利そうなものを発見。
■py-kqueue &#8211; スコトプリゴニエフスク通信
http://d.hatena.ne.jp/perezvon/20080330/1206879201
ここ [...]]]></description>
			<content:encoded><![CDATA[<p>py-kqueueという便利そうなものを発見。</p>
<p>■py-kqueue &#8211; スコトプリゴニエフスク通信<br />
<a href="http://d.hatena.ne.jp/perezvon/20080330/1206879201">http://d.hatena.ne.jp/perezvon/20080330/1206879201</a><br />
ここにあるように、</p>
<blockquote><p>sudo easy_install py-kqueue</p></blockquote>
<p>で、インストール・・・出来ない！！<br />
sys/event.hが無いんだって。</p>
<blockquote><p>sudo aptitude install libevent-dev</p></blockquote>
<p>これで、event.hはインストールされたはずだが同様のエラー。<br />
kqueuemodule.c内の&#8221;sys/event.h&#8221;を&#8221;event.h&#8221;に変えてもエラー発生。</p>
<p>う～ん・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/06/23/2184/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/06/23/2184/" />
	</item>
		<item>
		<title>ファイルの監視</title>
		<link>http://blog.sibrof.net/ken/2009/06/23/2181/</link>
		<comments>http://blog.sibrof.net/ken/2009/06/23/2181/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 16:13:02 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2181</guid>
		<description><![CDATA[効率のよい、ファイルの監視はどうすべきなのだろうか？
特定のディレクトリ配下を毎回全スキャンしても、平気なくらいのファイル数しかないが、それでも0.5秒に一回スキャンするのはちょっと・・・と思いつつ、ファイルをハッシュで [...]]]></description>
			<content:encoded><![CDATA[<p>効率のよい、ファイルの監視はどうすべきなのだろうか？<br />
特定のディレクトリ配下を毎回全スキャンしても、平気なくらいのファイル数しかないが、それでも0.5秒に一回スキャンするのはちょっと・・・と思いつつ、ファイルをハッシュで管理しても、変更があったか確認するために変更時刻は比較してるしなぁ。<br />
変更時刻を得る処理は重たいのか？<br />
この辺は・・・カーネル関係の本が必要？</p>
<p>ちょっと調べたらこんな感じ。<br />
■ファイル更新の監視 どう書く？org<br />
<a href="http://ja.doukaku.org/15/nested/#comment461">http://ja.doukaku.org/15/nested/#comment461</a><br />
・・・って自分で書いたのと変わらない。<br />
これでいいのかな？</p>
<p>.Net FrameworkにはFileSystemWatcherなるものがあるらしい。<br />
■FileSystemWatcher クラス (System.IO)<br />
<a href="http://msdn.microsoft.com/ja-jp/library/system.io.filesystemwatcher(VS.80).aspx">http://msdn.microsoft.com/ja-jp/library/system.io.filesystemwatcher(VS.80).aspx</a></p>
<blockquote><p>アセンブリ: System (system.dll 内)</p></blockquote>
<p>なんて書いてあるけど、こいつはカーネルレベルで監視！？<br />
どっちにしても.Netは関係ないんだけど <img src='http://blog.sibrof.net/ken/wp-includes/images/smilies/icon_rolleyes.gif' alt=':roll:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/06/23/2181/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/06/23/2181/" />
	</item>
		<item>
		<title>定期的に呼ぶ必要があるRPC</title>
		<link>http://blog.sibrof.net/ken/2009/06/21/2172/</link>
		<comments>http://blog.sibrof.net/ken/2009/06/21/2172/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 09:38:54 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2172</guid>
		<description><![CDATA[RPCで呼び出したシステムが動作してくれない。
と思ったら不具合なのか仕様なのかわからないけど、定期的に関数を呼ぶ必要があるようだ。
その関数と言うのはなんでもよくて、
def dummy(self):
    pass [...]]]></description>
			<content:encoded><![CDATA[<p>RPCで呼び出したシステムが動作してくれない。<br />
と思ったら不具合なのか仕様なのかわからないけど、定期的に関数を呼ぶ必要があるようだ。<br />
その関数と言うのはなんでもよくて、<br />
<code>def dummy(self):<br />
    pass</code><br />
なんてのでもOK。<br />
これってひどくないか？</p>
<p>RPCで呼びたいときに呼んでるのに、定期的に(例えば0.5秒間隔)関数を呼ばなければならないのか？<br />
ちょっとソースを見てみたけど、どこが原因かわからず。<br />
TCP関連のソースまで辿り着いてしまったので、この件はバージョンアップと供に解決すことを願い、後回し。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/06/21/2172/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/06/21/2172/" />
	</item>
		<item>
		<title>彼は・・・チュートリアルの作者！</title>
		<link>http://blog.sibrof.net/ken/2009/06/19/2158/</link>
		<comments>http://blog.sibrof.net/ken/2009/06/19/2158/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 14:00:44 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[python-cjson]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2158</guid>
		<description><![CDATA[Comet Daily » Blog Archive » Scalable Real-Time Web Architecture, Part 2: A Live Graph with Orbited, MorbidQ,  [...]]]></description>
			<content:encoded><![CDATA[<p>Comet Daily » Blog Archive » Scalable Real-Time Web Architecture, Part 2: A Live Graph with Orbited, MorbidQ, and js.io<br />
<a href="http://cometdaily.com/2008/10/10/scalable-real-time-web-architecture-part-2-a-live-graph-with-orbited-morbidq-and-jsio/">http://cometdaily.com/2008/10/10/scalable-real-time-web-architecture-part-2-a-live-graph-with-orbited-morbidq-and-jsio/</a><br />
このチュートリアルを参考していたが、なぜかエラーが・・・。<br />
仕組みが分からずチュートリアルをやっていたこともあり、不明点だらけのため、なかなか進まず。<br />
仕方ないので、エラー箇所を特定すべく、ひとつひとつ追って行った。<br />
追えばデバッグの仕方も自然と身につくものだ・・・初めはあんなにわけのわからないエラーログが、読めばいい場所がわかってくる。</p>
<p>で、結果的に追っていくと最後のJSON通知でエラーが発生しているらしい。<br />
早速ググってみると同じ現象の人発見！<br />
Stomp / IE6 fixes) so I&#8217;d &#8211; Orbited Discussion | Google グループ<br />
<a href="http://groups.google.com/group/orbited-users/browse_thread/thread/03486da9596e9dd1/c561d4a26e8e7046?show_docid=c561d4a26e8e7046&#038;pli=1">http://groups.google.com/group/orbited-users/browse_thread/thread/03486da9596e9dd1/c561d4a26e8e7046?show_docid=c561d4a26e8e7046&#038;pli=1</a></p>
<p>さらに記事を読んでいくとpython-cjsonパッケージを使えと書いてある。<br />
パッケージを使えとあるが、Python環境はここで閉じておきたいのでsetuptoolsを使う。<br />
sudo easy_install python-cjson<br />
これだけで解決した。<br />
さらにコメントの主を見てみると・・・どこかで見覚えがあるMichael Carterさん。<br />
チュートリアルの人だ！！<br />
名前を覚えるつもりは無かったけど、何十回も見ていたページなだけあって、知らずと記憶に残ってたらしい。<br />
これくらい追っていれば多少なりともなんか身に付くよね、と思った。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/06/19/2158/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/06/19/2158/" />
	</item>
		<item>
		<title>Django開発環境メモ</title>
		<link>http://blog.sibrof.net/ken/2009/06/07/2072/</link>
		<comments>http://blog.sibrof.net/ken/2009/06/07/2072/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 13:03:31 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu 9.04]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=2072</guid>
		<description><![CDATA[sudo aptitude install build-essential
sudo aptitude install python-dev
sudo easy_install twisted
sudo easy_ins [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>sudo aptitude install build-essential<br />
sudo aptitude install python-dev</p>
<p>sudo easy_install twisted<br />
sudo easy_install orbited<br />
sudo easy_install morbid</p></blockquote>
<p>[tutorial]How to: Django, Comet, Orbited, Stomp, MorbidQ, js.io | Thought Outflux | Anirudh Sanjeev<br />
<a href="http://anirudhsanjeev.org/tutorialhow-to-django-comet-orbited-stomp-morbidq-jsio/">http://anirudhsanjeev.org/tutorialhow-to-django-comet-orbited-stomp-morbidq-jsio/</a></p>
<p>Comet Daily » Blog Archive » Scalable Real-Time Web Architecture, Part 2: A Live Graph with Orbited, MorbidQ, and js.io<br />
<a href="http://cometdaily.com/2008/10/10/scalable-real-time-web-architecture-part-2-a-live-graph-with-orbited-morbidq-and-jsio/">http://cometdaily.com/2008/10/10/scalable-real-time-web-architecture-part-2-a-live-graph-with-orbited-morbidq-and-jsio/</a></p>
<p>ホームディレクトリにPythonの環境を整えてくれるvirtual pythonというものもあるのだが、Ubuntuの場合、site-packagesディレクトリではなく、dist-packagesという名前のせいで動作せず。<br />
コードを書き換えるか、dist-packagesにシンボリックリンクを張れば解決出来そうだけど、ノートPC自体自分の環境なので今回はいいや。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/06/07/2072/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/06/07/2072/" />
	</item>
		<item>
		<title>Orbited</title>
		<link>http://blog.sibrof.net/ken/2009/05/17/1929/</link>
		<comments>http://blog.sibrof.net/ken/2009/05/17/1929/#comments</comments>
		<pubDate>Sun, 17 May 2009 09:19:17 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[server]]></category>
		<category><![CDATA[Orbited]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=1929</guid>
		<description><![CDATA[Orbited – Networking for the Web
http://orbited.org/
この情報、国内は少ない！
cometを使いたいのだが、ちょいとイレギュラーな使い方になりそうだ・・・。
]]></description>
			<content:encoded><![CDATA[<p>Orbited – Networking for the Web<br />
<a href="http://orbited.org/">http://orbited.org/</a><br />
この情報、国内は少ない！</p>
<p>cometを使いたいのだが、ちょいとイレギュラーな使い方になりそうだ・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/05/17/1929/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/05/17/1929/" />
	</item>
		<item>
		<title>LinuxでのPython2.6</title>
		<link>http://blog.sibrof.net/ken/2009/04/21/1753/</link>
		<comments>http://blog.sibrof.net/ken/2009/04/21/1753/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:08:10 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=1753</guid>
		<description><![CDATA[今日は&#8221;おい〜！！&#8221;ってことがあったが、書けないので、書かず、Python2.6の話でも。
Ubuntu 8.10でPython2.6を使おうとすると何かと困る。
例えば、メニュー設定がうまく動か [...]]]></description>
			<content:encoded><![CDATA[<p>今日は&#8221;おい〜！！&#8221;ってことがあったが、書けないので、書かず、Python2.6の話でも。</p>
<p>Ubuntu 8.10でPython2.6を使おうとすると何かと困る。<br />
例えば、メニュー設定がうまく動かなかったり、dpkgの依存関係で怒られたり・・・と。<br />
そんなわけで、Ubuntuの構成上は2.5を使い、Django関係は2.6を使うという状態になってる。</p>
<p>CentoOSでPython2.6 &#038; mod_pythonを使おうとするとこれまた大変らしい。<br />
パッケージ管理を行っているOSはパッケージで済ませたいところだが、そうも行かないらしい。<br />
と言うわけで大変だったという話を聞いた。<br />
SRPMを使えば依存関係をそれなりに維持しつつ出来るかもしれないが、テストする環境がないので、機会があれば。</p>
<p>Ubuntu 9.04ではPython2.6が搭載されてるということで楽しみだったりする。<br />
・・・のだが、MacBookでいきなり動くとも思えないので、人柱の状況を見つつ、移行予定。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/04/21/1753/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/04/21/1753/" />
	</item>
		<item>
		<title>Ubuntuでメインメニューが開かない</title>
		<link>http://blog.sibrof.net/ken/2009/03/20/1553/</link>
		<comments>http://blog.sibrof.net/ken/2009/03/20/1553/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 15:41:20 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sibrof.net/ken/?p=1553</guid>
		<description><![CDATA[Ubuntuのメニューを変更する&#8221;メインメニュー&#8221;が開かない。
原因はPython2.6にしたことだった。
意外とPythonがOSに関わっていることが多くてびっくり。
OSはPython2.5に [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntuのメニューを変更する&#8221;メインメニュー&#8221;が開かない。<br />
原因はPython2.6にしたことだった。<br />
意外とPythonがOSに関わっていることが多くてびっくり。</p>
<p>OSはPython2.5に戻し、Eclipseの設定だけPython2.6にしておこう。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sibrof.net/ken/2009/03/20/1553/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.sibrof.net/ken/2009/03/20/1553/" />
	</item>
	</channel>
</rss>
