<?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>Lauct&#039;s BLOG &#187; Python</title>
	<atom:link href="http://blog.lauct.org/archives/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.lauct.org</link>
	<description>噢！醒來吧，沉睡者。</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:13:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://blog.lauct.org/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</title>
		<link>http://blog.lauct.org/archives/1472</link>
		<comments>http://blog.lauct.org/archives/1472#comments</comments>
		<pubDate>Thu, 12 Nov 2009 02:03:56 +0000</pubDate>
		<dc:creator>Lauct</dc:creator>
				<category><![CDATA[Unix-like]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.lauct.org/?p=1472</guid>
		<description><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->

<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
因為用 Leopard 內建的 Python 在互動模式下中文有問題 所以來用 MacPorts 裝 Python 2.6，裝好之後出現 To fully complete your installation and make python 2.6 the default, please run sudo port install python_select sudo python_select python26 python_select：Switch the default python interpreter 指令照打沒效=.= 還是自己作連結比較保險 cd /usr/bin/ sudo ln -s /opt/local/bin/python python Related posts:[MacPorts] install python26 [PHP] 在 Mac OS X Leopard 安裝 [...]


Related posts:<ol><li><a href='http://blog.lauct.org/archives/2021' rel='bookmark' title='Permanent Link: [MacPorts] install python26'>[MacPorts] install python26</a></li>
<li><a href='http://blog.lauct.org/archives/879' rel='bookmark' title='Permanent Link: [PHP] 在 Mac OS X Leopard 安裝 pear'>[PHP] 在 Mac OS X Leopard 安裝 pear</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
<p>因為用 Leopard 內建的 Python 在互動模式下中文有問題<br />
所以來用 MacPorts 裝 Python 2.6，裝好之後出現<br />
<code>To fully complete your installation and make python 2.6 the default, please run</p>
<p>	sudo port install python_select<br />
	sudo python_select python26<br />
</code></p>
<p>python_select：Switch the default python interpreter </p>
<hr />
指令照打沒效=.=</p>
<p>還是自己作連結比較保險</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python python</pre></div></div>



<p>Related posts:<ol><li><a href='http://blog.lauct.org/archives/2021' rel='bookmark' title='Permanent Link: [MacPorts] install python26'>[MacPorts] install python26</a></li>
<li><a href='http://blog.lauct.org/archives/879' rel='bookmark' title='Permanent Link: [PHP] 在 Mac OS X Leopard 安裝 pear'>[PHP] 在 Mac OS X Leopard 安裝 pear</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.lauct.org/archives/1472/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[Django] 調整時區和語系</title>
		<link>http://blog.lauct.org/archives/1470</link>
		<comments>http://blog.lauct.org/archives/1470#comments</comments>
		<pubDate>Wed, 11 Nov 2009 03:36:34 +0000</pubDate>
		<dc:creator>Lauct</dc:creator>
				<category><![CDATA[Web開發]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.lauct.org/?p=1470</guid>
		<description><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->

<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
進 settings.py 編輯 時區調整 TIME_ZONE = 'Asia/Taipei' 語系調整 LANGUAGE_CODE = 'zh-tw' Related posts:[Django] 安裝與開新專案步驟 [NAS-01G] backdoor script


Related posts:<ol><li><a href='http://blog.lauct.org/archives/1468' rel='bookmark' title='Permanent Link: [Django] 安裝與開新專案步驟'>[Django] 安裝與開新專案步驟</a></li>
<li><a href='http://blog.lauct.org/archives/1393' rel='bookmark' title='Permanent Link: [NAS-01G] backdoor script'>[NAS-01G] backdoor script</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
<p>進 settings.py 編輯</p>
<p>時區調整<br />
<code>TIME_ZONE = 'Asia/Taipei'</code></p>
<p>語系調整<br />
<code>LANGUAGE_CODE = 'zh-tw'</code></p>


<p>Related posts:<ol><li><a href='http://blog.lauct.org/archives/1468' rel='bookmark' title='Permanent Link: [Django] 安裝與開新專案步驟'>[Django] 安裝與開新專案步驟</a></li>
<li><a href='http://blog.lauct.org/archives/1393' rel='bookmark' title='Permanent Link: [NAS-01G] backdoor script'>[NAS-01G] backdoor script</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.lauct.org/archives/1470/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Django] 安裝與開新專案步驟</title>
		<link>http://blog.lauct.org/archives/1468</link>
		<comments>http://blog.lauct.org/archives/1468#comments</comments>
		<pubDate>Wed, 11 Nov 2009 02:10:36 +0000</pubDate>
		<dc:creator>Lauct</dc:creator>
				<category><![CDATA[Web開發]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[閱讀筆記]]></category>

		<guid isPermaLink="false">http://blog.lauct.org/?p=1468</guid>
		<description><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->

<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
安裝 tar zxvf Django-*.tar.gz cd Django-*. sudo python setup.py install 開一個新專案 ~/djcode$ django-admin.py startproject mysite ~/djcode$ ls -a mysite/ ./ ../ __init__.py manage.py settings.py urls.py __init__.py: 偽裝目錄成package manage.py: 一個cli的工具，讓妳可以用多種方式和Django專案互動 settings.py: Django專案的設定/組態 urls.py: 此Django專案的URL宣告 執行開發用Server ~/djcode/mysite$ python manage.py runserver Validating models... 0 errors found &#160; Django version 1.1.1, using settings 'mysite.settings' Development server is running at [...]


Related posts:<ol><li><a href='http://blog.lauct.org/archives/1470' rel='bookmark' title='Permanent Link: [Django] 調整時區和語系'>[Django] 調整時區和語系</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
<li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
<p><strong>安裝</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf Django-<span style="color: #000000; font-weight: bold;">*</span>.tar.gz</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> Django-<span style="color: #000000; font-weight: bold;">*</span>.</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p><strong>開一個新專案</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>djcode$ django-admin.py startproject mysite</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>djcode$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-a</span> mysite<span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>           ..<span style="color: #000000; font-weight: bold;">/</span>          __init__.py  manage.py    settings.py  urls.py</pre></div></div>

<blockquote>
<ul>__init__.py: 偽裝目錄成package</ul>
<ul>manage.py: 一個cli的工具，讓妳可以用多種方式和Django專案互動</ul>
<ul>settings.py: Django專案的設定/組態</ul>
<ul>urls.py: 此Django專案的URL宣告</ul>
</blockquote>
<p><strong>執行開發用Server</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>djcode<span style="color: #000000; font-weight: bold;">/</span>mysite$ python manage.py runserver
Validating models...
<span style="color: #000000;">0</span> errors found
&nbsp;
Django version 1.1.1, using settings <span style="color: #ff0000;">'mysite.settings'</span>
Development server is running at http:<span style="color: #000000; font-weight: bold;">//</span>127.0.0.1:<span style="color: #000000;">8000</span><span style="color: #000000; font-weight: bold;">/</span>
Quit the server with CONTROL-C.
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">/</span>Nov<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">55</span>:<span style="color: #000000;">59</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;GET / HTTP/1.1&quot;</span> <span style="color: #000000;">200</span> <span style="color: #000000;">2053</span></pre></div></div>

<div id="attachment_1469" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.lauct.org/wp-content/uploads/2009/11/dj-runserver.png"><img src="http://blog.lauct.org/wp-content/uploads/2009/11/dj-runserver-300x239.png" alt="It worked!" title="dj-runserver" width="300" height="239" class="size-medium wp-image-1469" /></a><p class="wp-caption-text">It worked!</p></div>
<blockquote><p><strong>改Port或IP</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python manage.py runserver <span style="color: #000000;">8080</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python manage.py runserver 0.0.0.0:<span style="color: #000000;">8080</span></pre></div></div>

</blockquote>


<p>Related posts:<ol><li><a href='http://blog.lauct.org/archives/1470' rel='bookmark' title='Permanent Link: [Django] 調整時區和語系'>[Django] 調整時區和語系</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
<li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.lauct.org/archives/1468/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Python] 在Python中使用中文</title>
		<link>http://blog.lauct.org/archives/1464</link>
		<comments>http://blog.lauct.org/archives/1464#comments</comments>
		<pubDate>Thu, 05 Nov 2009 03:18:29 +0000</pubDate>
		<dc:creator>Lauct</dc:creator>
				<category><![CDATA[電腦＆網路]]></category>
		<category><![CDATA[CJKV]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://blog.lauct.org/?p=1464</guid>
		<description><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->

<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
tchinese.py #!/bin/python print &#34;Python是個酷玩意&#34; python tchinese.py SyntaxError: Non-ASCII character '\xe6' in file tchinese.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details 錯誤訊息中的連結到這篇文章：PEP 0263 &#8212; Defining Python Source Code Encodings 文中提到： To define a source code encoding, a magic comment must be placed into the source files either as first or second line [...]


Related posts:<ol><li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
<li><a href='http://blog.lauct.org/archives/877' rel='bookmark' title='Permanent Link: [Perl] 私人工具箱：flickr2bps'>[Perl] 私人工具箱：flickr2bps</a></li>
<li><a href='http://blog.lauct.org/archives/1539' rel='bookmark' title='Permanent Link: [Java] 一般 Java 程式碼的結構長這樣'>[Java] 一般 Java 程式碼的結構長這樣</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
<p>tchinese.py</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/bin/python</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Python是個酷玩意&quot;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python tchinese.py
SyntaxError: Non-ASCII character <span style="color: #ff0000;">'\xe6'</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">file</span> tchinese.py on line <span style="color: #000000;">2</span>, but no encoding declared; see http:<span style="color: #000000; font-weight: bold;">//</span>www.python.org<span style="color: #000000; font-weight: bold;">/</span>peps<span style="color: #000000; font-weight: bold;">/</span>pep-0263.html <span style="color: #000000; font-weight: bold;">for</span> details</pre></div></div>

<p>錯誤訊息中的連結到這篇文章：<a href="http://www.python.org/dev/peps/pep-0263/">PEP 0263 &#8212; Defining Python Source Code Encodings</a><br />
文中提到：</p>
<blockquote><p>To define a source code encoding, a magic comment must be placed into the source files either as first or second line in the file, such as:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># coding=&lt;encoding name&gt;</span></pre></div></div>

<p>    or (using formats recognized by popular editors)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: &lt;encoding name&gt; -*-</span></pre></div></div>

<p>    or</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #808080; font-style: italic;"># vim: set fileencoding=&lt;encoding name&gt; :</span></pre></div></div>

</blockquote>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/bin/python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Python是個酷玩意&quot;</span></pre></div></div>

<p>Result:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Python是個酷玩意</pre></div></div>



<p>Related posts:<ol><li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
<li><a href='http://blog.lauct.org/archives/877' rel='bookmark' title='Permanent Link: [Perl] 私人工具箱：flickr2bps'>[Perl] 私人工具箱：flickr2bps</a></li>
<li><a href='http://blog.lauct.org/archives/1539' rel='bookmark' title='Permanent Link: [Java] 一般 Java 程式碼的結構長這樣'>[Java] 一般 Java 程式碼的結構長這樣</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.lauct.org/archives/1464/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Python] 學習參考資料: 如何像電腦科學家一樣思考、電腦做什麼事</title>
		<link>http://blog.lauct.org/archives/1458</link>
		<comments>http://blog.lauct.org/archives/1458#comments</comments>
		<pubDate>Mon, 02 Nov 2009 11:52:04 +0000</pubDate>
		<dc:creator>Lauct</dc:creator>
				<category><![CDATA[電腦＆網路]]></category>
		<category><![CDATA[Docs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.lauct.org/?p=1458</guid>
		<description><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->

<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
如何像電腦科學家一樣思考How to Think Like a Computer Scientist (中譯版) 原文 這是一本不錯的 Python 工具書，適合 Python 初學者閱讀的入門書 中譯版 如何像電腦科學家一樣思考 如何像電腦科學家一樣思考 &#124; 1.程式之道 如何像電腦科學家一樣思考 &#124; 2. 變數、表達式及陳述 如何像電腦科學家一樣思考 &#124; 3. 函數 如何像電腦科學家一樣思考 &#124; 4. 條件式 如何像電腦科學家一樣思考 &#124; 5. 多效函數 如何像電腦科學家一樣思考 &#124; 6. 重複 如何像電腦科學家一樣思考 &#124; 7. 字串 如何像電腦科學家一樣思考 &#124; 8. 案例研究： Catch 如何像電腦科學家一樣思考 &#124; 9. Tuple 如何像電腦科學家一樣思考 &#124;10. 模組和檔案 如何像電腦科學家一樣思考 [...]


Related posts:<ol><li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
<li><a href='http://blog.lauct.org/archives/882' rel='bookmark' title='Permanent Link: Perl, Python, Ruby 比較'>Perl, Python, Ruby 比較</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
<ul style="line-height: 1.5em; list-style-type: square; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0px; margin-left: 1.5em; list-style-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/bullet.gif); padding: 0px;">
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/en/Newsletter/Tech.-article/" rel="nofollow" href="http://www.openfoundry.org/en/Newsletter/Tech.-article/">如何像電腦科學家一樣思考</a>How to Think Like a Computer Scientist (中譯版) <a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://openbookproject.net/thinkcs/python/english2e/index.xhtml" rel="nofollow" href="http://openbookproject.net/thinkcs/python/english2e/index.xhtml">原文</a></li>
</ul>
<dl style="margin-top: 0.2em; margin-bottom: 0.5em;">
<dd style="line-height: 1.5em; margin-left: 2em; margin-bottom: 0.1em;">這是一本不錯的 Python 工具書，適合 Python 初學者閱讀的入門書</dd>
<dd style="line-height: 1.5em; margin-left: 2em; margin-bottom: 0.1em;">中譯版</p>
<ul style="line-height: 1.5em; list-style-type: square; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0px; margin-left: 1.5em; list-style-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/bullet.gif); padding: 0px;">
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1527/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1527/task,view/">如何像電腦科學家一樣思考</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1560/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1560/task,view/">如何像電腦科學家一樣思考 | 1.程式之道</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1587/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1587/task,view/">如何像電腦科學家一樣思考 | 2. 變數、表達式及陳述</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1629/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1629/task,view/">如何像電腦科學家一樣思考 | 3. 函數</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1694/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1694/task,view/">如何像電腦科學家一樣思考 | 4. 條件式</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1771/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1771/task,view/">如何像電腦科學家一樣思考 | 5. 多效函數</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1807/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1807/task,view/">如何像電腦科學家一樣思考 | 6. 重複</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1863/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1863/task,view/">如何像電腦科學家一樣思考 | 7. 字串</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1950/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,1950/task,view/">如何像電腦科學家一樣思考 | 8. 案例研究： Catch</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2011/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2011/task,view/">如何像電腦科學家一樣思考 | 9. Tuple</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2044/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2044/task,view/">如何像電腦科學家一樣思考 |10. 模組和檔案</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2070/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2070/task,view/">如何像電腦科學家一樣思考 |11. 檔案和例外</a></li>
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2088/task,view/" rel="nofollow" href="http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2088/task,view/">如何像電腦科學家一樣思考 |12. 類別與物件</a></li>
</ul>
</dd>
</dl>
<ul style="line-height: 1.5em; list-style-type: square; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0px; margin-left: 1.5em; list-style-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/bullet.gif); padding: 0px;">
<li style="margin-bottom: 0.1em;"><a style="text-decoration: none; color: #3366bb; background-image: url(http://w3.sy3es.tnc.edu.tw/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 0px; background-position: 100% 50%;" title="http://pydoing.blogspot.com/" rel="nofollow" href="http://pydoing.blogspot.com/">電腦做什麼事</a></li>
</ul>
<dl style="margin-top: 0.2em; margin-bottom: 0.5em;">
<dd style="line-height: 1.5em; margin-left: 2em; margin-bottom: 0.1em;"><strong>電腦做什麼事</strong>是一系列Python程式語言的教學文章，我們嘗試提供給讀者以簡單、直覺的方式學習程式語言，進而了解體會電腦背後運作的道理。</dd>
</dl>
<p>&#8211;</p>
<p>來源：<a href="http://w3.sy3es.tnc.edu.tw/wiki/index.php/學習寫程式">學習寫程式 &#8211; Sy3es_wiki</a></p>


<p>Related posts:<ol><li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
<li><a href='http://blog.lauct.org/archives/882' rel='bookmark' title='Permanent Link: Perl, Python, Ruby 比較'>Perl, Python, Ruby 比較</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.lauct.org/archives/1458/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl, Python, Ruby 比較</title>
		<link>http://blog.lauct.org/archives/882</link>
		<comments>http://blog.lauct.org/archives/882#comments</comments>
		<pubDate>Tue, 13 Jan 2009 17:01:18 +0000</pubDate>
		<dc:creator>Lauct</dc:creator>
				<category><![CDATA[閒話PC]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://localhost/~chun/wordpress/?p=882</guid>
		<description><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->

<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
剛找了一下這三種動態語言的比較，來小小整理一下。 Perl Perl 語言的中心思想可以集成為一句話「TMTOWTDI」： There&#8217;s More Than One Way To Do It. （不只一種方法來做這件事。） Perl 的作者 Larry Wall 建議可以把這個縮寫詞念成「Tim Toady」。 另一個常常讓人想起的 Perl 俗語是： Easy things should be easy, and hard things should be possible. Python Python 發明人 Tim Peters 寫的 python 格言（稱為The Zen of Python）道： There should be one&#8211; and preferably only one &#8211;obvious way to [...]


Related posts:<ol><li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
<li><a href='http://blog.lauct.org/archives/877' rel='bookmark' title='Permanent Link: [Perl] 私人工具箱：flickr2bps'>[Perl] 私人工具箱：flickr2bps</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
<p>剛找了一下這三種動態語言的比較，來小小整理一下。</p>
<h3>Perl</h3>
<hr />
<blockquote>
Perl 語言的中心思想可以集成為一句話「TMTOWTDI」：</p>
<blockquote><p>There&#8217;s More Than One Way To Do It.<br />
（不只一種方法來做這件事。）</p></blockquote>
<p>Perl 的作者 Larry Wall 建議可以把這個縮寫詞念成「Tim Toady」。</p>
<p>另一個常常讓人想起的 Perl 俗語是：</p>
<blockquote><p>Easy things should be easy, and hard things should be possible.</p></blockquote>
</blockquote>
<p></p>
<h3>Python</h3>
<hr />
<blockquote>
Python 發明人 Tim Peters 寫的 python 格言（稱為The Zen of Python）道：</p>
<blockquote><p>There should be one&#8211; and preferably only one &#8211;obvious way to do it.</p></blockquote>
</blockquote>
<p></p>
<h3>Ruby</h3>
<hr />
<blockquote><p>KISS原則（Keep It Super Simple）</p></blockquote>
<blockquote><p>POLS原則（最小驚訝原則）：Principle Of Least Surprise</p></blockquote>
<p>
參考資料1：<a href="http://www.wretch.cc/blog/bafu/13740254">人蔘劇場 &#8211; Ruby，Python，Perl 中心思想的不同</a><br />
參考資料2：<a href="http://lightyror.thegiive.net/2008/01/ruby-python.html">Lighty RoR: Ruby 跟 Python 本質上不同</a><br />
<br />
參考資料3：<a href="http://inet6.blogspot.com/2008/01/blog-post.html">INET6: 先天與後天程式語言風格</a></p>


<p>Related posts:<ol><li><a href='http://blog.lauct.org/archives/1472' rel='bookmark' title='Permanent Link: [MacPorts][Python] python_select：選擇 Python 版本+手動指定'>[MacPorts][Python] python_select：選擇 Python 版本+手動指定</a></li>
<li><a href='http://blog.lauct.org/archives/1464' rel='bookmark' title='Permanent Link: [Python] 在Python中使用中文'>[Python] 在Python中使用中文</a></li>
<li><a href='http://blog.lauct.org/archives/877' rel='bookmark' title='Permanent Link: [Perl] 私人工具箱：flickr2bps'>[Perl] 私人工具箱：flickr2bps</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.lauct.org/archives/882/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

