<?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>python &#8211; 扫地老僧的Blog</title>
	<atom:link href="https://doyj.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>https://doyj.com</link>
	<description>Laputa - 远方地平线，闪耀着光芒</description>
	<lastBuildDate>Sun, 01 May 2016 00:13:23 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>Python老兵的新征程</title>
		<link>https://doyj.com/2016/05/01/</link>
					<comments>https://doyj.com/2016/05/01/#comments</comments>
		
		<dc:creator><![CDATA[oldmonk]]></dc:creator>
		<pubDate>Sun, 01 May 2016 00:10:10 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.doyj.com/?p=2167</guid>

					<description><![CDATA[用Python已经有近9年了， 大多数时候都是用它来做些内部使用的小工具，写的都比较随意（唯一的正式项目经历， &#8230; <a href="https://doyj.com/2016/05/01/" class="more-link">继续阅读<span class="screen-reader-... ]]></description>
										<content:encoded><![CDATA[<p>用Python已经有近9年了， 大多数时候都是用它来做些内部使用的小工具，写的都比较随意（唯一的正式项目经历，就是写一个用户评论搜索引擎，那个网站已经关闭了，当年的页面可在<a href="https://web.archive.org/web/20121001144102/http://www.review.gs/" target="_blank">archive.org</a>看到）。 做这些开发时，开发的方法思路其实和十来年前没啥差别，当然有了些更好的辅助工具，例如Git，Pycharm等， 但主要方法没啥大变化。 这周用Python做另一个正式项目，尝试采用了和以前都不一样的方法，通过这一个星期学习到了不少新东西。</p>
<ol>
<li>用<a href="https://github.com/yyuu/pyenv" target="_blank">pyenv</a>来管理python的不同版本,<br />
因为项目用了Python 3.5, 而系统是Python 2.7</li>
<li>用了Python 3.5的<a href="https://docs.python.org/3/library/typing.html" target="_blank">Type Hints</a></li>
<li>用<a href="https://github.com/blue-yonder/pyscaffold/tree/v2.5.5" target="_blank">PyScaffold</a>初始化了项目<br />
以前也用Django来生成过web项目，但非web项目还是第一次用生成器生成。</li>
<li>用<a href="https://github.com/commitizen/cz-cli" target="_blank">commitizen</a>来写git commit message， 这样能够用<a href="https://github.com/commitizen/cz-conventional-changelog" target="_blank">cz-conventional-changelog</a>自动生成change log</li>
<li>用<a href="https://www.pylint.org/" target="_blank">pylint</a>，<a href="https://pypi.python.org/pypi/flake8" target="_blank">flake8</a>做代码检查</li>
<li>用<a href="https://pypi.python.org/pypi/tox" target="_blank">tox</a>做测试</li>
<li>在Git pre commit hook中加入pylint，flake8，tox检查</li>
<li>用<a href="http://www.sqlalchemy.org/" target="_blank">SQLAlchemy</a>来做ORM， 用<a href="https://pypi.python.org/pypi/alembic" target="_blank">Alembic</a>做数据库的版本升级管理<br />
以前都是直接写SQL -_-;，当然是参数化的。 这次先用phpMyAdmin直接在mysql上设计数据表，然后用<a href="https://pypi.python.org/pypi/sqlacodegen" target="_blank">sqlacodegen</a>生成model代码，再用Alembic做版本管理。</li>
<li>用<a href="https://travis-ci.org/" target="_blank">Travis</a>做系统集成</li>
<li>用<a href="https://pypi.python.org/pypi/pip" target="_blank">pip</a>做依赖管理
<ol>
<li>用pip freeze &gt; requirements.txt 来记录依赖</li>
<li>再用pip install -r requirements.txt来重建依赖环境</li>
<li>正在研究<a href="https://pypi.python.org/pypi/virtualenv" target="_blank">virtualenv</a>以实现依赖的隔离</li>
<li>另：以前研究过Docker，遇到些问题没能搞定，有经验的还请指点一二</li>
</ol>
</li>
<li>和<a href="https://slack.com/" target="_blank">Slack</a>集成<br />
现在已经能从Slack里看到Github的提交，Pull request提醒，并能看到Travis持续进程测试结果。上线时还要实现从聊天频道里直接下指令部署。</li>
</ol>
<p>感觉现在开发的思想，哲学都比起20年前，甚至比起10年前都有了根本的改变，我们正迎来程序开发上的工业革命，生为这个时代的程序员是何其的幸福啊 ：）。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://doyj.com/2016/05/01/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>在Windows的Apache 2.2上安装mod_python 3.2.10</title>
		<link>https://doyj.com/2006/11/12/</link>
					<comments>https://doyj.com/2006/11/12/#respond</comments>
		
		<dc:creator><![CDATA[oldmonk]]></dc:creator>
		<pubDate>Sun, 12 Nov 2006 00:53:54 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.doyj.com/2006/11/12/</guid>

					<description><![CDATA[想给自己的Apache服务器安装mod_python, 在mod_python主页只能看到3.2.8 for  &#8230; <a href="https://doyj.com/2006/11/12/" class="more-link">继续阅读<span class="screen-reader-text">在Windows的Apache 2.2上安装mod_python 3.2.10</spa... ]]></description>
										<content:encoded><![CDATA[<p>想给自己的Apache服务器安装mod_python, 在mod_python主页只能看到3.2.8 for windows, 这个版本只能在Apache 2.0下工作。找了半天，在<a target="_blank" href="http://www.china-django.com/download/">china-django.com</a>, 找到了爱好者自己编译出来的mod_python 3.2.10 for windows。 安装的时候发现还需要一个msvcr71.dll， 原来是VC 7.1 的一个动态库，从别的机器上拷过来就好了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://doyj.com/2006/11/12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
