<?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>KYOKUTYO NO BLOG. &#187; Python</title>
	<atom:link href="http://blog.kyokutyo.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kyokutyo.com</link>
	<description>dododododo.....</description>
	<lastBuildDate>Sun, 15 Aug 2010 16:02:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pythonでパスからファイル名を取り出す方法</title>
		<link>http://blog.kyokutyo.com/dev/python%e3%81%a7%e3%83%91%e3%82%b9%e3%81%8b%e3%82%89%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%90%8d%e3%82%92%e5%8f%96%e3%82%8a%e5%87%ba%e3%81%99%e6%96%b9%e6%b3%95-2/</link>
		<comments>http://blog.kyokutyo.com/dev/python%e3%81%a7%e3%83%91%e3%82%b9%e3%81%8b%e3%82%89%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%90%8d%e3%82%92%e5%8f%96%e3%82%8a%e5%87%ba%e3%81%99%e6%96%b9%e6%b3%95-2/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 06:16:41 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/dev/python%e3%81%a7%e3%83%91%e3%82%b9%e3%81%8b%e3%82%89%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%90%8d%e3%82%92%e5%8f%96%e3%82%8a%e5%87%ba%e3%81%99%e6%96%b9%e6%b3%95-2/</guid>
		<description><![CDATA[Pythonでパスからファイル名を取り出す方法メモ。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
&#160;
import os
&#160;
filepath = '/ [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/dev/python%e3%81%a7%e3%83%91%e3%82%b9%e3%81%8b%e3%82%89%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%90%8d%e3%82%92%e5%8f%96%e3%82%8a%e5%87%ba%e3%81%99%e6%96%b9%e6%b3%95-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>genshiでCDATA書いたら消えた</title>
		<link>http://blog.kyokutyo.com/python/genshi%e3%81%a7cdata%e6%9b%b8%e3%81%84%e3%81%9f%e3%82%89%e6%b6%88%e3%81%88%e3%81%9f/</link>
		<comments>http://blog.kyokutyo.com/python/genshi%e3%81%a7cdata%e6%9b%b8%e3%81%84%e3%81%9f%e3%82%89%e6%b6%88%e3%81%88%e3%81%9f/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 12:02:19 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/genshi%e3%81%a7cdata%e6%9b%b8%e3%81%84%e3%81%9f%e3%82%89%e6%b6%88%e3%81%88%e3%81%9f/</guid>
		<description><![CDATA[テンプレートファイルにCDATA書いたのに吐き出されたHTMLファイルでは消えてた。
index.tmpl
&#160;
    &#60;script type=&#34;text/javascript&#34;&#038;g [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/genshi%e3%81%a7cdata%e6%9b%b8%e3%81%84%e3%81%9f%e3%82%89%e6%b6%88%e3%81%88%e3%81%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Djangoのテンプレートでつまづき中</title>
		<link>http://blog.kyokutyo.com/python/django%e3%81%ae%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%81%a7%e3%81%a4%e3%81%be%e3%81%a5%e3%81%84%e3%81%a6%e3%82%8b%e3%81%a8%e3%81%93%e3%82%8d/</link>
		<comments>http://blog.kyokutyo.com/python/django%e3%81%ae%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%81%a7%e3%81%a4%e3%81%be%e3%81%a5%e3%81%84%e3%81%a6%e3%82%8b%e3%81%a8%e3%81%93%e3%82%8d/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 11:06:57 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/django%e3%81%ae%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%81%a7%e3%81%a4%e3%81%be%e3%81%a5%e3%81%84%e3%81%a6%e3%82%8b%e3%81%a8%e3%81%93%e3%82%8d/</guid>
		<description><![CDATA[Djangoのテンプレートでfor文中で3回に1度だけ文字列を出力したい。
&#160;
&#123;% for item in items %&#125;
  &#123;&#123; item.name &#125; [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/django%e3%81%ae%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%81%a7%e3%81%a4%e3%81%be%e3%81%a5%e3%81%84%e3%81%a6%e3%82%8b%e3%81%a8%e3%81%93%e3%82%8d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonことはじめ #8</title>
		<link>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-8/</link>
		<comments>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-8/#comments</comments>
		<pubDate>Mon, 12 May 2008 18:10:28 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-8/</guid>
		<description><![CDATA[Instant Hacking
練習2の"ユークリッドの互除法によって2個の数の最大公約数を求める関数を書きなさい。"をやってみた。
#!C:\\Python25\\python.exe
&#160;
def hcd&# [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jython</title>
		<link>http://blog.kyokutyo.com/python/jython/</link>
		<comments>http://blog.kyokutyo.com/python/jython/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 18:50:37 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/jython/</guid>
		<description><![CDATA[Jython は Python、Java の初心者が触れてもいいものだろうか。
まったく理解できる気がしないな。出直す。ひとまずPythonの勉強をする。
Jythonプログラミングとか買うとしたら数年後。
]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/jython/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonことはじめ #7</title>
		<link>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-7/</link>
		<comments>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-7/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 15:19:17 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-7/</guid>
		<description><![CDATA[DBをアップデートする。
入力画面text.htmlのソース:
&#38;lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#38;gt;
&#38;lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34; xml:lang=&#34;ja&#34; lang=&#34;ja&#34;&#38;gt;
  &#38;lt;head&#38;gt;
    &#38;lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html;charset=utf-8&#34; /&#38;gt;
    &#38;lt;title/&#38;gt;Form&#38;lt;/title&#38;gt;
  &#38;lt;/head/&#38;gt;
  &#38;lt;body/&#38;gt;
    &#38;lt;form action=&#34;./form.py&#34; method=&#34;post&#34;&#38;gt;
      &#38;lt;p&#38;gt;
        &#38;lt;input type=&#34;text&#34; value=&#34;&#34; name=&#34;text&#34; /&#38;gt;
     [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonことはじめ #6</title>
		<link>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-6/</link>
		<comments>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-6/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 16:46:56 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-6/</guid>
		<description><![CDATA[DBに格納されたデータを参照してみる。
testというDBにpytestというテーブルを作成して、
&#124;title&#124;body&#124;
&#124;test&#124;aaa&#124;
というデータを格納。
index.py:
#!C:\\Python25\\python.exe
# -*- coding: utf-8 -*-
&#160;
import MySQLdb
con = MySQLdb.connect&#40;db=&#34;test&#34;, host=&#34;localhost&#34;, port=3306, user=&#34;testuser&#34;, passwd=&#34;********&#34;&#41;
cur = con.cursor&#40;&#41;
&#160;
s = &#34;SELECT title, body FROM pytest&#34;
cur.execute&#40;s&#41;
r = cur.fetchone&#40;&#41;
&#160;
print &#34;Content-type:text/html\n\n&#34;
print &#34;&#38;lt;!DOCTYPE html PUBLIC \\&#34;-//W3C//DTD XHTML 1.0 Strict//EN\\&#34; \\&#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\&#34;&#38;gt;&#34;
print &#34;&#38;lt;html xmlns=\&#34;http://www.w3.org/1999/xhtml\&#34; xml:lang=\&#34;ja\&#34; lang=\&#34;ja\&#34;&#38;gt;&#34;
print &#34;&#38;lt;head&#38;gt;&#34;
print &#34;&#38;lt;meta http-equiv=\&#34;Content-Type\&#34; content=\&#34;text/html;charset=utf-8\&#34; /&#38;gt;&#34;
print &#34;&#38;lt;title&#38;gt;Pythonことはじめ&#38;lt;/title&#38;gt;&#34;
print &#34;&#38;lt;/head&#38;gt;&#34;
print &#34;&#38;lt;body&#38;gt;&#34;
print &#34;&#38;lt;p&#38;gt;&#34;
&#160;
while r != None:
  print &#34;%-10s &#124; %-40s&#34; % r
   [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonことはじめ #5</title>
		<link>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-5/</link>
		<comments>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-5/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 15:43:28 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-5/</guid>
		<description><![CDATA[ファイルを読み込んで表示。
Python でファイルを読む
を参考に。
f = open('text.txt', 'r')

for line in f:
    print line,

f.close()
サンプルコ [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonことはじめ #4</title>
		<link>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-4/</link>
		<comments>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-4/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 16:21:54 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-4/</guid>
		<description><![CDATA[なにかテンプレートエンジンをいじってみたくなったので探してみたらGenshiってのがちょっと気になったので触ってみる。
参考：

ウノウラボ Unoh Labs: Pythonのテンプレートエンジンここで知って
MISE [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythonことはじめ #3</title>
		<link>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-3/</link>
		<comments>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-3/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 16:52:56 +0000</pubDate>
		<dc:creator>kyokutyo</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-3/</guid>
		<description><![CDATA[関数を書いてみる
#!C:\\Python25\\python.exe
# -*- coding: utf-8 -*-

def Say(x):
    return x * 2

print "Content-type [...]]]></description>
		<wfw:commentRss>http://blog.kyokutyo.com/python/python%e3%81%93%e3%81%a8%e3%81%af%e3%81%98%e3%82%81-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
