<?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>David Euler on coding and design</title>
	<atom:link href="http://www.beyondlinux.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beyondlinux.com</link>
	<description>Thoughts on search engine,cloud,big data,linux,java,lucene,hadoop</description>
	<lastBuildDate>Thu, 17 May 2012 17:24:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>An multiple application pyramid project configuration</title>
		<link>http://www.beyondlinux.com/2012/03/22/an-multiple-project-application-in-pyrami/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-multiple-project-application-in-pyrami</link>
		<comments>http://www.beyondlinux.com/2012/03/22/an-multiple-project-application-in-pyrami/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 14:54:40 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[pyramid]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=524</guid>
		<description><![CDATA[In the deployment of pyramid project, I don&#8217;t want to setup a separate process for each pyramid application. So it comes the requirement to deploy multiple application under one project. Here&#8217;s an example configuration for a multiple app project. The &#8230; <a href="http://www.beyondlinux.com/2012/03/22/an-multiple-project-application-in-pyrami/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In the deployment of pyramid project, I don&#8217;t want to setup a separate process for each pyramid application. So it comes the requirement to deploy multiple application under one project.</p>
<p>Here&#8217;s an example configuration for a multiple app project. The project has 2 application, booksearch and mybackup. The configuration file syntax is the same as production.ini which is in paste deploy format. For interpretation of each section see: <a href="http://pythonpaste.org/deploy/#composite-applications">http://pythonpaste.org/deploy/#composite-applications</a></p>
<p>webapp-production.ini</p>
<pre class="brush:py">[composite:main]
use = egg:Paste#urlmap
/ = home
/booksearch = booksearch
/mybackup = mybackup

[app:booksearch]
use = egg:booksearch

[app:mybackup]
use = egg:mybackup

[app:home]
use = egg:Paste#static
document_root = %(here)s/htdocs

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 9090</pre>
<p>You can run pserve to start the project:</p>
<p>$pserve webapp-production.ini</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F&amp;title=An+multiple+application+pyramid+project+configuration" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F&amp;title=An+multiple+application+pyramid+project+configuration" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F&amp;title=An+multiple+application+pyramid+project+configuration" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=An+multiple+application+pyramid+project+configuration&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=An+multiple+application+pyramid+project+configuration&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=An+multiple+application+pyramid+project+configuration&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F&amp;title=An+multiple+application+pyramid+project+configuration&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Fan-multiple-project-application-in-pyrami%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/03/22/an-multiple-project-application-in-pyrami/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install an OpenVPN server and connect to it on windows</title>
		<link>http://www.beyondlinux.com/2012/03/22/install-an-openvpn-server-and-connect-to-it-on-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-an-openvpn-server-and-connect-to-it-on-windows</link>
		<comments>http://www.beyondlinux.com/2012/03/22/install-an-openvpn-server-and-connect-to-it-on-windows/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 09:08:37 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=519</guid>
		<description><![CDATA[Follow the tutorial on linode to install openvpn: http://library.linode.com/networking/openvpn/debian-6-squeeze Attention: Both openvpn and dnsmasq shall be installed on the server. And on the file /etc/openvpn/server.conf, the following line must be exist and not commented : push &#8220;redirect-gateway def1&#8243; By default &#8230; <a href="http://www.beyondlinux.com/2012/03/22/install-an-openvpn-server-and-connect-to-it-on-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Follow the tutorial on linode to install openvpn:<br />
<a href="http://library.linode.com/networking/openvpn/debian-6-squeeze" target="_blank"> http://library.linode.com/networking/openvpn/debian-6-squeeze</a></p>
<p>Attention:<br />
Both openvpn and dnsmasq shall be installed on the server.</p>
<p>And on the file /etc/openvpn/server.conf, the following line must be exist and not commented :<br />
push &#8220;redirect-gateway def1&#8243;</p>
<p>By default the line is :<br />
;push &#8220;redirect-gateway def1 bypass-dhcp&#8221;<br />
The semi-colon should be removed, and &#8220;bypass-dhcp&#8221; should be removed too.</p>
<p><strong>redirect-gateway </strong>option to configure the VPN as the default gateway (implemented on Linux and Windows only).</p>
<p><strong><a href="http://openvpn.net/archive/openvpn-users/2005-10/msg00229.html" target="_blank">redirect-gateway bypass-dhcp</a></strong> option to add a route<br />
allowing DHCP packets to bypass the tunnel, when the<br />
DHCP server is non-local. Currently only implemented<br />
on Windows clients.</p>
<p>Another tip: In the local directive in the begging of server.conf, ip address of your server should be configured:<br />
local 102.83.214.229</p>
<p>On the client, just install OpenVPN GUI on windows, and download client.conf, ca.crt, client1.crt, client2.key to the OpenVPN/Config folder from the VPN server. The config folder is located at C:\Program Files\OpenVPN\config on my system.</p>
<p>And rename client.conf to vpn-server.ovpn (a mandatory step), start OpenVPN client and click connect.</p>
<p>Some faqs:<br />
1.How to tell if openvpn is installed correctly on the sever.<br />
Just run netstat -na|grep 1194 to check whether it is listening, and check whether the process is running by ps. 1194 is the listening port configured at server.conf</p>
<p>2.Why I cann&#8217;t telnet to the 1194?<br />
openvpn is an UDP server by default, you can&#8217;t telnet to an UDP port.</p>
<p>3.How could I check if my client is connected to the server?<br />
If the OpenVPN tray turn to green, you are connected to the server.<br />
And you can ping the vpn server, if it replies, it is connected:<br />
ping 10.8.0.1</p>
<p>4.Why I could not visit some sites on the world after connected to the openvpn server.<br />
If your local DNS server is polluted and you are not redirect DNS lookup to VPN server, you will still not be able to open the blocked site. On the vpn server, dnsmasq must be installed, and the following exact line exist at server.conf<br />
push &#8220;redirect-gateway def1&#8243;</p>
<p>5.How could check the route process to a host such as twitter from linux/windows?<br />
on linux: traceroute twitter.com<br />
on windows: tracert twitter.com</p>
<p>You can also run nslookup on windows, and host/digg on linux for debugging.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F&amp;title=Install+an+OpenVPN+server+and+connect+to+it+on+windows" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F&amp;title=Install+an+OpenVPN+server+and+connect+to+it+on+windows" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F&amp;title=Install+an+OpenVPN+server+and+connect+to+it+on+windows" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Install+an+OpenVPN+server+and+connect+to+it+on+windows&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Install+an+OpenVPN+server+and+connect+to+it+on+windows&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Install+an+OpenVPN+server+and+connect+to+it+on+windows&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F&amp;title=Install+an+OpenVPN+server+and+connect+to+it+on+windows&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F22%2Finstall-an-openvpn-server-and-connect-to-it-on-windows%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/03/22/install-an-openvpn-server-and-connect-to-it-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install a network HP printer on Arch linux</title>
		<link>http://www.beyondlinux.com/2012/03/16/how-to-install-a-network-hp-printer-on-arch-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-install-a-network-hp-printer-on-arch-linux</link>
		<comments>http://www.beyondlinux.com/2012/03/16/how-to-install-a-network-hp-printer-on-arch-linux/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 06:54:06 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[arch]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=516</guid>
		<description><![CDATA[The printer package does not work as it should be on my arch for HP laser jet P2035n. It costs me some hour to get it to work. Here&#8217;s the steps. 1). Install cups service pacman -S cups cups-pdf hplip &#8230; <a href="http://www.beyondlinux.com/2012/03/16/how-to-install-a-network-hp-printer-on-arch-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The printer package does not work as it should be on my arch for HP laser jet P2035n. It costs me some hour to get it to work. Here&#8217;s the steps.</p>
<p>1). Install cups service<br />
pacman -S cups cups-pdf  hplip pyqt3 python2-pyqt<br />
pacman -S system-config-printer-gnome<br />
rc.d cups start</p>
<p>2). To add device and install hp driver:<br />
1. Run &#8216;hp-setup&#8217; as root.<br />
2. Click &#8216;Show Advanced Options&#8217; button and check-enable &#8216;Manual Discovery&#8217;.<br />
3. Enter IP address 192.168.59.63 in the &#8216;&#8230;device ID&#8230;&#8217; entry and click &#8216;Next&#8217; to install driver.</p>
<p>3). run system-config-printer as root, to add printer</p>
<p># system-config-printer<br />
click &#8220;Add&#8221;， Select Device -> Network Printer -> input the IP address of the printer such as &#8220;192.168.1.3&#8243;, click &#8220;Find&#8221; -> &#8220;Process&#8221;</p>
<p>If you encounter the following error:<br />
  File &#8220;/usr/share/system-config-printer/newprinter.py&#8221;, line 1531, in getNetworkPrinterMakeModel<br />
    debugprint (host + &#8220;: &#8221; + args)<br />
TypeError: cannot concatenate &#8216;str&#8217; and &#8216;list&#8217; objects</p>
<p>You should comment out the error line at 1531 of newprinter.py, and then continue to add the printer.</p>
<p>4). Finally, you can run hp-check to see what problems exists for the printer.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F&amp;title=How+to+install+a+network+HP+printer+on+Arch+linux" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F&amp;title=How+to+install+a+network+HP+printer+on+Arch+linux" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F&amp;title=How+to+install+a+network+HP+printer+on+Arch+linux" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=How+to+install+a+network+HP+printer+on+Arch+linux&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=How+to+install+a+network+HP+printer+on+Arch+linux&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=How+to+install+a+network+HP+printer+on+Arch+linux&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F&amp;title=How+to+install+a+network+HP+printer+on+Arch+linux&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fhow-to-install-a-network-hp-printer-on-arch-linux%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/03/16/how-to-install-a-network-hp-printer-on-arch-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Could not chdir to home directory /home/USER: Permission denied</title>
		<link>http://www.beyondlinux.com/2012/03/16/could-not-chdir-to-home-directory-homeuser-permission-denied/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=could-not-chdir-to-home-directory-homeuser-permission-denied</link>
		<comments>http://www.beyondlinux.com/2012/03/16/could-not-chdir-to-home-directory-homeuser-permission-denied/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 06:44:50 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=514</guid>
		<description><![CDATA[We changed the home folder to /data/home/USER. When I ssh to our centos server. It shows error &#8220;Could not chdir to home directory /home/USER: Permission denied&#8221;, however loggin ok. I must manually run cd ~ to go to the home &#8230; <a href="http://www.beyondlinux.com/2012/03/16/could-not-chdir-to-home-directory-homeuser-permission-denied/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We changed the home folder to /data/home/USER.</p>
<p>When I ssh to our centos server. It shows error &#8220;Could not chdir to home directory /home/USER: Permission denied&#8221;, however loggin ok. I must manually run cd ~ to go to the home directory.</p>
<p>Googled around, and found it is caused by selinux. The solution:</p>
<p>To disabling selinux or change it from enforcing to permissive.<br />
vi /etc/sysconfig/selinux<br />
change SELINUX from enforcing to permissive: SELINUX=permissive, then reboot.</p>
<p>For server could not be rebooted:<br />
#setenforce permissive</p>
<p>You can check if set correctly<br />
#getenforce</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F&amp;title=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F&amp;title=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F&amp;title=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F&amp;title=Could+not+chdir+to+home+directory+%2Fhome%2FUSER%3A+Permission+denied&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F03%2F16%2Fcould-not-chdir-to-home-directory-homeuser-permission-denied%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/03/16/could-not-chdir-to-home-directory-homeuser-permission-denied/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Open source libraries in chrome 17</title>
		<link>http://www.beyondlinux.com/2012/02/19/open-source-libraries-in-chrome-17/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=open-source-libraries-in-chrome-17</link>
		<comments>http://www.beyondlinux.com/2012/02/19/open-source-libraries-in-chrome-17/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 16:21:44 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[tech watch]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=500</guid>
		<description><![CDATA[Credits David M. Gay&#8217;s floating point routines homepage dynamic annotations homepage Netscape Portable Runtime (NSPR) homepage Network Security Services (NSS) homepage purify headers homepage google-glog&#8217;s symbolization library homepage valgrind homepage xdg-mime homepage xdg-user-dirs homepage BSDiff homepage XZ Utils homepage google-jstemplate &#8230; <a href="http://www.beyondlinux.com/2012/02/19/open-source-libraries-in-chrome-17/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span class="page-title" style="float:left;">Credits</span><br />
<br />
<span class="title">David M. Gay&#8217;s floating point routines</span><br />
<span class="homepage"><a href="http://www.netlib.org/fp/">homepage</a></span></p>
<p><span class="title">dynamic annotations</span><br />
<span class="homepage"><a href="http://code.google.com/p/data-race-test/wiki/DynamicAnnotations">homepage</a></span><br />
<br /><span class="title">Netscape Portable Runtime (NSPR)</span><br />
<span class="homepage"><a href="http://www.mozilla.org/projects/nspr/">homepage</a></span><br />
<br /><span class="title">Network Security Services (NSS)</span><br />
<span class="homepage"><a href="http://www.mozilla.org/projects/security/pki/nss/">homepage</a></span><br />
<br /><span class="title">purify headers</span><br />
<span class="homepage"><a href="http://www-01.ibm.com/software/awdtools/purify/">homepage</a></span><br />
<br /><span class="title">google-glog&#8217;s symbolization library</span><br />
<span class="homepage"><a href="http://code.google.com/p/google-glog/">homepage</a></span><br />
<br /><span class="title">valgrind</span><br />
<span class="homepage"><a href="http://valgrind.org">homepage</a></span><br />
<br /><span class="title">xdg-mime</span><br />
<span class="homepage"><a href="http://portland.freedesktop.org/wiki/">homepage</a></span><br />
<br /><span class="title">xdg-user-dirs</span><br />
<span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/xdg-user-dirs">homepage</a></span><br />
<br /><span class="title">BSDiff</span><br />
<span class="homepage"><a href="http://www.daemonology.net/bsdiff/">homepage</a></span><br />
<br /><span class="title">XZ Utils</span><br />
<span class="homepage"><a href="http://tukaani.org/xz/">homepage</a></span><br />
<br /><span class="title">google-jstemplate</span><br />
<span class="homepage"><a href="http://code.google.com/p/google-jstemplate/">homepage</a></span><br />
<br /><span class="title">Launchpad Translations</span><br />
<span class="homepage"><a href="http://people.ubuntu.com/~fta/chromium/translations/trunk/patched-files/chrome/app/resources/">homepage</a></span><br />
<br /><span class="title">Mozilla Personal Security Manager</span><br />
<span class="homepage"><a href="http://mxr.mozilla.org/mozilla-central/source/security/manager/">homepage</a></span><br />
<br /><span class="title">gssapi</span><br />
<span class="homepage"><a href="https://hg.mozilla.org/mozilla-central/file/05f3c68e73c9/extensions/auth/gssapi.h">homepage</a></span><br />
<br /><span class="title">Google Toolbox for Mac</span><br />
<span class="homepage"><a href="http://code.google.com/p/google-toolbox-for-mac/">homepage</a></span><br />
<br /><span class="title">WebKit</span><br />
<span class="homepage"><a href="http://webkit.org/">homepage</a></span><br />
<br /><span class="title">ActiveX Scripting SDK</span><br />
<span class="homepage"><a href="http://support.microsoft.com/kb/223389">homepage</a></span><br />
<br /><span class="title">Almost Native Graphics Layer Engine</span><br />
<span class="homepage"><a href="http://code.google.com/p/angleproject/">homepage</a></span><br />
<br /><span class="title">Apple sample code</span><br />
<span class="homepage"><a href="http://developer.apple.com/">homepage</a></span><br />
<br /><span class="title">Darwin</span><br />
<span class="homepage"><a href="http://www.opensource.apple.com/">homepage</a></span><br />
<br /><span class="title">bsdiff</span><br />
<span class="homepage"><a href="http://lxr.mozilla.org/mozilla/source/other-licenses/bsdiff/bsdiff.c">homepage</a></span><br />
<br /><span class="title">bspatch</span><br />
<span class="homepage"><a href="http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/">homepage</a></span><br />
<br /><span class="title">bzip2</span><br />
<span class="homepage"><a href="http://www.bzip.org/downloads.html">homepage</a></span><br />
<br /><span class="title">Google Cache Invalidation API</span><br />
<span class="homepage"><a href="http://code.google.com/p/google-cache-invalidation-api/">homepage</a></span><br />
<br /><span class="title">Compact Language Detection</span><br />
<span class="homepage"><a href="http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/">homepage</a></span><br />
<br /><span class="title">codesighs</span><br />
<span class="homepage"><a href="http://hg.mozilla.org/mozilla-central/tools/codesighs">homepage</a></span><br />
<br /><span class="title">expat</span><br />
<span class="homepage"><a href="http://sourceforge.net/projects/expat/">homepage</a></span><br />
<br /><span class="title">ffmpeg</span><br />
<span class="homepage"><a href="http://ffmpeg.org/">homepage</a></span><br />
<br /><span class="title">OpenGL ES 2.0 Programming Guide</span><br />
<span class="homepage"><a href="http://opengles-book.com/">homepage</a></span><br />
<br /><span class="title">OpenGL ES 2.0 Conformance Tests</span><br />
<span class="homepage"><a href="https://www.khronos.org/opengles/adopters/login/conformance/">homepage</a></span><br />
<br /><span class="title">gpsd</span><br />
<span class="homepage"><a href="http://git.berlios.de/cgi-bin/gitweb.cgi?p=gpsd;a=summary">homepage</a></span><br />
<br /><span class="title">Harfbuzz</span><br />
<span class="homepage"><a href="http://freedesktop.org/wiki/Software/HarfBuzz">homepage</a></span><br />
<br /><span class="title">hunspell</span><br />
<span class="homepage"><a href="http://hunspell.sourceforge.net/">homepage</a></span><br />
<br /><span class="title">hunspell dictionaries</span><br />
<span class="homepage"><a href="http://wiki.services.openoffice.org/wiki/Dictionaries">homepage</a></span><br />
<br /><span class="title">hyphen-2.6</span><br />
<span class="homepage"><a href="http://sourceforge.net/projects/hunspell/files/Hyphen/">homepage</a></span><br />
<br /><span class="title">IAccessible2 COM interfaces for accessibility</span><br />
<span class="homepage"><a href="http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2">homepage</a></span><br />
<br /><span class="title">iccjpeg</span><br />
<span class="homepage"><a href="http://www.ijg.org">homepage</a></span><br />
<br /><span class="title">ICU</span><br />
<span class="homepage"><a href="http://site.icu-project.org/">homepage</a></span><br />
<br /><span class="title">Chinese and Japanese Word List</span><br />
<span class="homepage"><a href="http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/icu42/source/data/brkitr/">homepage</a></span><br />
<br /><span class="title">ISimpleDOM COM interfaces for accessibility</span><br />
<span class="homepage"><a href="http://www.mozilla.org/access/windows/at-apis">homepage</a></span><br />
<br /><span class="title">jemalloc</span><br />
<span class="homepage"><a href="http://hg.mozilla.org/mozilla-central/src/memory">homepage</a></span><br />
<br /><span class="title">lcov</span><br />
<span class="homepage"><a href="http://ltp.sourceforge.net/coverage/lcov.php">homepage</a></span><br />
<br /><span class="title">libevent</span><br />
<span class="homepage"><a href="http://www.monkey.org/~provos/libevent/">homepage</a></span><br />
<br /><span class="title">libjingle</span><br />
<span class="homepage"><a href="http://code.google.com/p/libjingle/">homepage</a></span><br />
<br /><span class="title">libjpeg</span><br />
<span class="homepage"><a href="http://www.ijg.org/">homepage</a></span><br />
<br /><span class="title">libjpeg-turbo</span><br />
<span class="homepage"><a href="http://sourceforge.net/projects/libjpeg-turbo/">homepage</a></span><br />
<br /><span class="title">libpng</span><br />
<span class="homepage"><a href="http://libpng.org/">homepage</a></span><br />
<br /><span class="title">libsrtp</span><br />
<span class="homepage"><a href="http://srtp.sourceforge.net">homepage</a></span><br />
<br /><span class="title">libvpx</span><br />
<span class="homepage"><a href="http://www.webmproject.org">homepage</a></span><br />
<br /><span class="title">libwebpdecode</span><br />
<span class="homepage"><a href="http://code.google.com/speed/webp">homepage</a></span><br />
<br /><span class="title">libxml</span><br />
<span class="homepage"><a href="http://xmlsoft.org">homepage</a></span><br />
<br /><span class="title">libxslt</span><br />
<span class="homepage"><a href="http://xmlsoft.org/XSLT">homepage</a></span><br />
<br /><span class="title">LZMA SDK</span><br />
<span class="homepage"><a href="http://www.7-zip.org/sdk.html">homepage</a></span><br />
<br /><span class="title">MesaLib</span><br />
<span class="homepage"><a href="http://www.mesa3d.org/">homepage</a></span><br />
<br /><span class="title">modp base64 decoder</span><br />
<span class="homepage"><a href="http://modp.com/release/base64/">homepage</a></span><br />
<br /><span class="title">NSBezierPath additions from Sean Patrick O&#8217;Brien</span><br />
<span class="homepage"><a href="http://www.seanpatrickobrien.com/journal/posts/3">homepage</a></span><br />
<br /><span class="title">Mongoose</span><br />
<span class="homepage"><a href="http://code.google.com/p/mongoose/">homepage</a></span><br />
<br /><span class="title">Cocoa extension code from Camino</span><br />
<span class="homepage"><a href="http://caminobrowser.org/">homepage</a></span><br />
<br /><span class="title">npapi</span><br />
<span class="homepage"><a href="http://mxr.mozilla.org/mozilla-central/source/modules/plugin/base/public/">homepage</a></span><br />
<br /><span class="title">OCMock</span><br />
<span class="homepage"><a href="http://www.mulle-kybernetik.com/software/OCMock/">homepage</a></span><br />
<br /><span class="title">OpenMAX IL</span><br />
<span class="homepage"><a href="http://www.khronos.org/openmax/">homepage</a></span><br />
<br /><span class="title">openssl</span><br />
<span class="homepage"><a href="http://openssl.org/source/">homepage</a></span><br />
<br /><span class="title">OTS (OpenType Sanitizer)</span><br />
<span class="homepage"><a href="http://code.google.com/p/ots/">homepage</a></span><br />
<br /><span class="title">pdfsqueeze</span><br />
<span class="homepage"><a href="http://code.google.com/p/pdfsqueeze/">homepage</a></span><br />
<br /><span class="title">ppapi</span><br />
<span class="homepage"><a href="http://code.google.com/p/ppapi/">homepage</a></span><br />
<br /><span class="title">protobuf</span><br />
<span class="homepage"><a href="http://protobuf.googlecode.com/svn/trunk">homepage</a></span><br />
<br /><span class="title">pyftpdlib</span><br />
<span class="homepage"><a href="http://code.google.com/p/pyftpdlib/">homepage</a></span><br />
<br /><span class="title">pywebsocket</span><br />
<span class="homepage"><a href="http://code.google.com/p/pywebsocket/">homepage</a></span><br />
<br /><span class="title">Google Safe Browsing</span><br />
<span class="homepage"><a href="http://code.google.com/p/google-safe-browsing/">homepage</a></span><br />
<br /><span class="title">simplejson</span><br />
<span class="homepage"><a href="http://undefined.org/python/#simplejson">homepage</a></span><br />
<br /><span class="title">skia</span><br />
<span class="homepage"><a href="http://code.google.com/p/skia">homepage</a></span><br />
<br /><span class="title">speex</span><br />
<span class="homepage"><a href="http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz">homepage</a></span><br />
<br /><span class="title">SQLite</span><br />
<span class="homepage"><a href="http://sqlite.org/">homepage</a></span><br />
<br /><span class="title">swig</span><br />
<span class="homepage"><a href="http://www.swig.org/download.html">homepage</a></span><br />
<br /><span class="title">talloc</span><br />
<span class="homepage"><a href="http://talloc.samba.org/talloc/doc/html/index.html">homepage</a></span><br />
<br /><span class="title">tcmalloc</span><br />
<span class="homepage"><a href="http://google-perftools.googlecode.com/">homepage</a></span><br />
<br /><span class="title">tlslite</span><br />
<span class="homepage"><a href="http://trevp.net/tlslite/">homepage</a></span><br />
<br /><span class="title">undoview</span><br />
<span class="homepage"><a href="http://projects.gnome.org/gtksourceview/">homepage</a></span><br />
<br /><span class="title">Webdriver</span><br />
<span class="homepage"><a href="http://seleniumhq.org">homepage</a></span><br />
<br /><span class="title">WTL 8.0</span><br />
<span class="homepage"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e5ba5ba4-6e6b-462a-b24c-61115e846f0c">homepage</a></span><br />
<br /><span class="title">xdg-utils</span><br />
<span class="homepage"><a href="http://portland.freedesktop.org/wiki/">homepage</a></span><br />
<br /><span class="title">XUL Runner SDK</span><br />
<span class="homepage"><a href="https://developer.mozilla.org/en/Gecko_SDK">homepage</a></span><br />
<br /><span class="title">yasm</span><br />
<span class="homepage"><a href="http://www.tortall.net/projects/yasm/">homepage</a></span><br />
<br /><span class="title">zlib</span><br />
<span class="homepage"><a href="http://zlib.net/">homepage</a></span><br />
<br /><span class="title">Strongtalk</span><br />
<span class="homepage"><a href="http://www.strongtalk.org/">homepage</a></span></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F&amp;title=Open+source+libraries+in+chrome+17" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F&amp;title=Open+source+libraries+in+chrome+17" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F&amp;title=Open+source+libraries+in+chrome+17" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Open+source+libraries+in+chrome+17&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Open+source+libraries+in+chrome+17&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Open+source+libraries+in+chrome+17&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F&amp;title=Open+source+libraries+in+chrome+17&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F19%2Fopen-source-libraries-in-chrome-17%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/02/19/open-source-libraries-in-chrome-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fetchmail configuration file</title>
		<link>http://www.beyondlinux.com/2012/02/18/fetchmail-configuration-file/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fetchmail-configuration-file</link>
		<comments>http://www.beyondlinux.com/2012/02/18/fetchmail-configuration-file/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 08:26:58 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=484</guid>
		<description><![CDATA[fetchmail is a mail-retrieval and forwarding utility; it fetches mail from remote mailservers and forwards it to your local (client) machine&#8217;s delivery system. You can then handle the retrieved mail using normal mail user agents such as mutt(1), elm(1) or &#8230; <a href="http://www.beyondlinux.com/2012/02/18/fetchmail-configuration-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>fetchmail is a mail-retrieval and forwarding utility; it fetches mail from remote mailservers and forwards it to<br />
your local (client) machine&#8217;s delivery system. You can then handle the retrieved mail using normal mail user<br />
agents such as mutt(1), elm(1) or Mail(1). The fetchmail utility can be run in a daemon mode to repeatedly poll<br />
one or more systems at a specified interval.</p>
<p>Below is a sample configuration of $HOME/.fetchmailrc for gmail.</p>
<p>The user specifies email login name; password specifies the login password, and is &#8216;david&#8217; means you login the linux system as user david. If the login name isn&#8217;t correct, &#8220;unkown user&#8221; error will show when retrieving email.</p>
<p>For certificates generation and promail configuration, see:</p>
<p><a href="http://www.andrews-corner.org/mutt.html#fetchmail">http://www.andrews-corner.org/mutt.html#fetchmail</a></p>
<pre class="brush:plain">poll pop.gmail.com 
with proto POP3 
user 'david.euler' 
there with password 'xxxxyyyy' 
is 'david' here 
mda "/usr/bin/procmail -d %T" 
options 
no keep 
ssl 
sslcertck 
sslcertpath /home/david/.certs/</pre>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F&amp;title=fetchmail+configuration+file" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F&amp;title=fetchmail+configuration+file" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F&amp;title=fetchmail+configuration+file" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=fetchmail+configuration+file&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=fetchmail+configuration+file&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=fetchmail+configuration+file&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F&amp;title=fetchmail+configuration+file&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F18%2Ffetchmail-configuration-file%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/02/18/fetchmail-configuration-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pyramid FAQ: from the beginning to production deployment</title>
		<link>http://www.beyondlinux.com/2012/02/12/pyramid-faq-from-beginning-to-production-deploymen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pyramid-faq-from-beginning-to-production-deploymen</link>
		<comments>http://www.beyondlinux.com/2012/02/12/pyramid-faq-from-beginning-to-production-deploymen/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 14:07:33 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[faq]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=474</guid>
		<description><![CDATA[I started to write pyramid applications 3 weeks ago, as a python and pyramid novice.  Now the application goes to production.  In the development process, many errors and problems happened to the application, although the pyramid documentation is very good, &#8230; <a href="http://www.beyondlinux.com/2012/02/12/pyramid-faq-from-beginning-to-production-deploymen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I started to write pyramid applications 3 weeks ago, as a python and pyramid novice.  Now the application goes to production.  In the development process, many errors and problems happened to the application, although the pyramid documentation is very good, some latest changes are not included in the reference document.</p>
<p>I wrote down the common problems I came across ,  and the solution I chose against the problem here.</p>
<p><strong>1. How to install pyramid?</strong></p>
<p>For help getting Pyramid set up, try the official <a href="http://docs.pylonsproject.org/en/latest/docs/pyramid_install.html">install guide</a>.</p>
<p>Also you may be interested at my <a title="how to install pyramid" href="http://www.beyondlinux.com/2012/01/27/how-to-install-pyramid/" target="_blank">pyramid installation guide</a>.</p>
<p><strong>2. Is there a quick start?</strong></p>
<p>Yes, there is. To get the feel of how a Pyramid web application is created, go to the <a href="http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/single_file_tasks/single_file_tasks.html">single file tasks tutorial</a> page on the official site.</p>
<p>But be careful, the single file application is just for learning. It is single threaded which is not suitable for most production deployment. And it is not good for maintenance when all content in a single file.</p>
<p><strong>3. How could I create a project for production deployment?</strong></p>
<p>A scaffold project could be created for production deployment. A scaffold project means a template project. You can create project from scaffold.  See the <strong>outdated</strong> official <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.2-branch/tutorials/wiki2/index.html">wiki tutorial</a> for a general guide, the tutorial is for pyramid 1.2 which is different from 1.3. For current pyramid 1.3, you should read this document: <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/">Pyramid documentation 1.3</a> . I&#8217;ve written  <a title="Permalink to A quick start for python pyramid" href="http://www.beyondlinux.com/2012/02/10/a-quick-start-for-python-pyramid/" rel="bookmark">A quick start for python pyramid</a> for quick reference of pyramid project creation.</p>
<p><strong>4.When I create project by the wiki tutorial of Pyramid and run paster create xxx, it shows command not found?</strong></p>
<p>Paster may not be installed. And if you are using pyraid 1.3 paster is not needed any more, see official <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/">Pyramid documentation 1.3</a> for detail.</p>
<p><strong>5. The wiki tutorial said run &#8220;paster serve development.ini&#8221; to start pyramid. But paster does not exist.</strong></p>
<p>Paster serve is replaced by pserve in pyramid 1.3.</p>
<pre>$ ../bin/pserve development.ini</pre>
<p><strong>6. When I run &#8220;pserve development.ini&#8221; to start pyramid by <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/">Pyramid documentation 1.3</a>. It shows error: &#8220;pkg_resources.DistributionNotFound: waitress&#8221;.</strong></p>
<p>In pyramid 1.3a7, a new dependency waitress is introduced. You can install the packed by easy_install or pip: pip install waitress</p>
<p><strong>7.When I start pyramid by pserve, it allows visiting of only 1 concurrent user.</strong></p>
<p>pserve is single threaded, and is for development purpose. For multithreaded production deployment, you should take one of these wsgi server.</p>
<p><strong>8. Is there a simple way to deploy pyramid as multithreaded application?</strong></p>
<p>Yes, you can Gunicorn to deploy pyramid as multithreaded application.</p>
<p>Firstly install gunicorn and eventlet:</p>
<pre class="brush:shell">$easy_install gunicorn eventlet</pre>
<p>Then create file runapp.py as the following lines:</p>
<pre class="brush:py">from paste.deploy import loadapp 

application = loadapp('config:production.ini', relative_to='.')</pre>
<p>Then run the following command to start pyramid as multithreaded application:</p>
<pre class="brush:shell">$gunicorn --workers=2 --worker-class=eventlet --bind 127.0.0.1:80 runapp</pre>
<p>the worker-class means to start gunicorn in async mode(multi threaded).</p>
<p>&nbsp;</p>
<p>And for single threaded deployment, you can easily run Gunicorn with `pserve production.ini` if you&#8217;ve been using with Waitress. Just replace the [server:main] section within production.ini as shown in the document: <a href="http://gunicorn.org/run.html#paster-serve" target="_blank">http://gunicorn.org/run.html#paster-serve</a></p>
<p><a href="http://gunicorn.org/design.html#contents" target="_blank">http://gunicorn.org/design.html#contents</a></p>
<p><a href="http://gunicorn.org/configure.html#worker-class" target="_blank">http://gunicorn.org/configure.html#worker-class</a></p>
<p>&nbsp;</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F&amp;title=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F&amp;title=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F&amp;title=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F&amp;title=Pyramid+FAQ%3A+from+the+beginning+to+production+deployment&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F12%2Fpyramid-faq-from-beginning-to-production-deploymen%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/02/12/pyramid-faq-from-beginning-to-production-deploymen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A quick start for python pyramid</title>
		<link>http://www.beyondlinux.com/2012/02/10/a-quick-start-for-python-pyramid/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-quick-start-for-python-pyramid</link>
		<comments>http://www.beyondlinux.com/2012/02/10/a-quick-start-for-python-pyramid/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 15:30:05 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=467</guid>
		<description><![CDATA[Installation of pyramid 1.Install python 2.7/3.x 2.Install setuptools For windows, please add C:\Python27\Scripts to PATH variable. For ubuntu: apt-get install python-setuptools 3.Install virtualenv $easy_install virtualenv On windows, download virtualenv-1.7.tar.gz, decompress, and run : python setup.py install create a virtual working &#8230; <a href="http://www.beyondlinux.com/2012/02/10/a-quick-start-for-python-pyramid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Installation of pyramid</strong></p>
<p><strong>1.Install python 2.7/3.x</strong></p>
<p><strong>2.Install setuptools</strong></p>
<p>For windows, please add C:\Python27\Scripts to PATH variable.</p>
<p>For ubuntu: apt-get install python-setuptools</p>
<p><strong>3.Install virtualenv</strong></p>
<p>$easy_install virtualenv</p>
<p>On windows, download virtualenv-1.7.tar.gz, decompress, and run : python setup.py install</p>
<p>create a virtual working directory mysite:<br />
virtualenv mysite<br />
cd mysite<br />
source bin/activate  (Scripts\activate.bat)</p>
<p>Then variable $VIRTUAL_ENV will be set;  and virtualenv modified $PATH, appended bin/python,<br />
also virtualenv installed pip at ENV/bin; so new python packages would be installed here, such as: pip install html5lib.</p>
<p>clear virtual env:<br />
virtualenv &#8211;clear mysite</p>
<p><strong>4. Install Pyramid and Preparation</strong></p>
<p><strong>Preparation, on unix/linux:</strong></p>
<p>After you’ve got your env virtualenv installed, you may install Pyramid itself using the following commands from within the virtualenv (env) directory:</p>
<p>$ bin/easy_install pyramid <strong></strong></p>
<p>$bin/easy_install docutils nose coverage zope.sqlalchemy SQLAlchemy pyramid_tm waitress</p>
<p><strong>Preparation, on Windows</strong><br />
Use your Python’s virtualenv to make a workspace:</p>
<p>c:\&gt; c:\Python26\Scripts\virtualenv mysite<br />
Switch to the pyramidtut directory:</p>
<p>c:\&gt; cd mysite<br />
Use easy_install to get Pyramid and its direct dependencies installed:</p>
<p>c:\mysite&gt; Scripts\easy_install pyramid<br />
Use easy_install to install various packages from PyPI.</p>
<p>c:\mysite&gt; Scripts\easy_install docutils nose coverage zope.sqlalchemy SQLAlchemy pyramid_tm waitress<br />
<strong>5. How to create project aimed at deployment</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong>5.1. Making a Project</strong><br />
Your next step is to create a project. Pyramid supplies a variety of scaffolds to generate sample projects. We will use the pyramid_routesalchemy scaffold, which generates an application that uses SQLAlchemy and URL dispatch.</p>
<p>The below instructions assume your current working directory is the “virtualenv” named “pyramidtut”.</p>
<p>On UNIX, for pyramid 1.2:<br />
$ bin/paster create -t pyramid_routesalchemy tutorial</p>
<p>On Windows, for pyramid 1.2:<br />
c:\pyramidtut&gt; Scripts\paster create -t pyramid_routesalchemy tutorial</p>
<p>On unix, for pyramid 1.3:<br />
$ bin/pcreate &#8211;list-templates<br />
$ bin/pcreate -s starter tutorial</p>
<p>On Windows, for pyramid 1.3:<br />
scripts\pcreate &#8211;list-templates<br />
scripts\pcreate -s starter tutorial</p>
<p>Note</p>
<p>If you are using Windows, the pyramid_routesalchemy scaffold may not deal gracefully with installation into a location that contains spaces in the path. If you experience startup problems, try putting both the virtualenv and the project into directories that do not contain spaces in their paths.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>5.2. Installing the Project in “Development Mode”</strong><br />
In order to do development on the project easily, you must “register” the project as a development egg in your workspace using the setup.py develop command. In order to do so, cd to the “tutorial” directory you created in Making a Project, and run the “setup.py develop” command using virtualenv Python interpreter.</p>
<p>On UNIX:</p>
<p>$ cd tutorial<br />
$ ../bin/python setup.py develop</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
On Windows:</p>
<p>c:\pyramidtut&gt; cd tutorial<br />
c:\pyramidtut\tutorial&gt; ..\Scripts\python setup.py develop</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong>5.3 Running the Tests</strong><br />
After you’ve installed the project in development mode, you may run the tests for the project.</p>
<p>On UNIX:</p>
<p>$ ../bin/python setup.py test -q<br />
On Windows:</p>
<p>c:\pyramidtut\tutorial&gt; ..\Scripts\python setup.py test -q</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>5.4. install new project:</strong></p>
<p>$ cd MyProject<br />
$ ..\Scripts\python.exe setup.py develop</p>
<p>This will install adistributionrepresenting your project into the interpreter’s library set so it can be found by import statements and by other console scripts such aspserve, pshell, proutes and pviews</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>5.5. Starting the Application</strong><br />
Start the application.</p>
<p>On UNIX:</p>
<p>$ ../bin/pserve development.ini<br />
or<br />
$ ../bin/pserve development.ini &#8211;reload</p>
<p>When &#8211;reload is passed topserve, changes to any Python module your project uses will cause the server to restart. This<br />
typically makes development easier, as changes to Python code made within a Pyramid application is not<br />
put into effect until the server restarts.</p>
<p>On Windows:</p>
<p>c:\pyramidtut\tutorial&gt; ..\Scripts\pserve development.ini<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>5.6. Visit the Application in a Browser</strong><br />
In a browser, visit http://localhost:6543/. You will see the generated application’s default page.</p>
<p>One thing you’ll notice is the “debug toolbar” icon on right hand side of the page. You can read more about the purpose of the icon at The Debug Toolbar. It allows you to get information about your application while you develop.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>5.7.Exposing Test Coverage Information</strong></p>
<p>You can run the nosetests command to see test coverage information. This runs the tests in the same way that setup.py test does but provides additional “coverage” information, exposing which lines of your project are “covered” (or not covered) by the tests.</p>
<p>To get this functionality working, we’ll need to install a couple of other packages into our virtualenv: nose and coverage:</p>
<p>On UNIX:</p>
<p>$ ../bin/easy_install nose coverage<br />
On Windows:</p>
<p>c:\pyramidtut\tutorial&gt; ..\Scripts\easy_install nose coverage<br />
Once nose and coverage are installed, we can actually run the coverage tests.</p>
<p>On UNIX:</p>
<p>$ ../bin/nosetests &#8211;cover-package=tutorial &#8211;cover-erase &#8211;with-coverage<br />
On Windows:</p>
<p>c:\pyramidtut\tutorial&gt; ..\Scripts\nosetests &#8211;cover-package=tutorial ^<br />
&#8211;cover-erase &#8211;with-coverage<br />
Looks like our package’s models module doesn’t quite have 100% test coverage.</p>
<p>&nbsp;</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F&amp;title=A+quick+start+for+python+pyramid" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F&amp;title=A+quick+start+for+python+pyramid" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F&amp;title=A+quick+start+for+python+pyramid" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=A+quick+start+for+python+pyramid&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=A+quick+start+for+python+pyramid&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=A+quick+start+for+python+pyramid&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F&amp;title=A+quick+start+for+python+pyramid&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F10%2Fa-quick-start-for-python-pyramid%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/02/10/a-quick-start-for-python-pyramid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The concurrent.futures module in python 3.2</title>
		<link>http://www.beyondlinux.com/2012/02/07/the-concurrent-futures-module-in-python-3-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-concurrent-futures-module-in-python-3-2</link>
		<comments>http://www.beyondlinux.com/2012/02/07/the-concurrent-futures-module-in-python-3-2/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 04:55:44 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=465</guid>
		<description><![CDATA[A brief introduction on concurrent module in python 3.2 (from python docs) Code for creating and managing concurrency is being collected in a new top-level namespace, concurrent. Its first member is a futures package which provides a uniform high-level interface &#8230; <a href="http://www.beyondlinux.com/2012/02/07/the-concurrent-futures-module-in-python-3-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>A brief introduction on concurrent module in python 3.2 (from python docs)</strong></p>
<p>Code for creating and managing concurrency is being collected in a new top-level namespace, <em>concurrent</em>. Its first member is a <em>futures</em> package which provides a uniform high-level interface for managing threads and processes.</p>
<p>The design for <a title="concurrent.futures: Execute computations concurrently using threads or processes." href="http://docs.python.org/dev/library/concurrent.futures.html#module-concurrent.futures"><tt>concurrent.futures</tt></a> was inspired by the <em>java.util.concurrent</em> package. In that model, a running call and its result are represented by a <a title="concurrent.futures.Future" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.Future"><tt>Future</tt></a> object that abstracts features common to threads, processes, and remote procedure calls. That object supports status checks (running or done), timeouts, cancellations, adding callbacks, and access to results or exceptions.</p>
<p>The primary offering of the new module is a pair of executor classes for launching and managing calls. The goal of the executors is to make it easier to use existing tools for making parallel calls. They save the effort needed to setup a pool of resources, launch the calls, create a results queue, add time-out handling, and limit the total number of threads, processes, or remote procedure calls.</p>
<p>Ideally, each application should share a single executor across multiple components so that process and thread limits can be centrally managed. This solves the design challenge that arises when each component has its own competing strategy for resource management.</p>
<p>Both classes share a common interface with three methods: <a title="concurrent.futures.Executor.submit" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.Executor.submit"><tt>submit()</tt></a> for scheduling a callable and returning a <a title="concurrent.futures.Future" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.Future"><tt>Future</tt></a> object; <a title="concurrent.futures.Executor.map" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.Executor.map"><tt>map()</tt></a> for scheduling many asynchronous calls at a time, and <a title="concurrent.futures.Executor.shutdown" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.Executor.shutdown"><tt>shutdown()</tt></a> for freeing resources. The class is a <a href="http://docs.python.org/dev/glossary.html#term-context-manager"><em>context manager</em></a> and can be used in a <a href="http://docs.python.org/dev/reference/compound_stmts.html#with"><tt>with</tt></a> statement to assure that resources are automatically released when currently pending futures are done executing.</p>
<p>A simple of example of <a title="concurrent.futures.ThreadPoolExecutor" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor"><tt>ThreadPoolExecutor</tt></a> is a launch of four parallel threads for copying files:</p>
<div>
<div>
<pre>import concurrent.futures, shutil
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as e:
    e.submit(shutil.copy, 'src1.txt', 'dest1.txt')
    e.submit(shutil.copy, 'src2.txt', 'dest2.txt')
    e.submit(shutil.copy, 'src3.txt', 'dest3.txt')
    e.submit(shutil.copy, 'src3.txt', 'dest4.txt')</pre>
</div>
</div>
<div>
<p>See also</p>
<dl>
<dt><a href="http://www.python.org/dev/peps/pep-3148"><strong>PEP 3148</strong></a> &#8211; Futures – Execute Computations Asynchronously</dt>
<dd>PEP written by Brian Quinlan.</dd>
</dl>
<p><a href="http://docs.python.org/dev/library/concurrent.futures.html#threadpoolexecutor-example"><em>Code for Threaded Parallel URL reads</em></a>, an example using threads to fetch multiple web pages in parallel.</p>
<p><a href="http://docs.python.org/dev/library/concurrent.futures.html#processpoolexecutor-example"><em>Code for computing prime numbers in parallel</em></a>, an example demonstrating <a title="concurrent.futures.ProcessPoolExecutor" href="http://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor"><tt>ProcessPoolExecutor</tt></a>.</p>
</div>
<p><a title="using python concurrent" href="http://aser.ornl.gov/publications_2011/Publication%2032198_Begoli.pdf" target="_blank">Using the New Python 3.2 Concurrent Programming Features </a></p>
<p>&nbsp;</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F&amp;title=The+concurrent.futures+module+in+python+3.2" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F&amp;title=The+concurrent.futures+module+in+python+3.2" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F&amp;title=The+concurrent.futures+module+in+python+3.2" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=The+concurrent.futures+module+in+python+3.2&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=The+concurrent.futures+module+in+python+3.2&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=The+concurrent.futures+module+in+python+3.2&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F&amp;title=The+concurrent.futures+module+in+python+3.2&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F07%2Fthe-concurrent-futures-module-in-python-3-2%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/02/07/the-concurrent-futures-module-in-python-3-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to convert string with timezone info to date in python</title>
		<link>http://www.beyondlinux.com/2012/02/06/how-to-convert-string-with-timezone-info-to-date-in-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-convert-string-with-timezone-info-to-date-in-python</link>
		<comments>http://www.beyondlinux.com/2012/02/06/how-to-convert-string-with-timezone-info-to-date-in-python/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 15:27:04 +0000</pubDate>
		<dc:creator>euler</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.beyondlinux.com/?p=460</guid>
		<description><![CDATA[In python, time.strftime() and time.strptime() can be used to format a date to string, and convert string to date. But it is thought buggy in the pyhon strptime() at 2.x version. For example, if you invoke strptime(), It does not &#8230; <a href="http://www.beyondlinux.com/2012/02/06/how-to-convert-string-with-timezone-info-to-date-in-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In python, time.strftime() and time.strptime() can be used to format a date to string, and convert string to date. But it is thought buggy in the pyhon <a title="strptime bug" href="http://bugs.python.org/issue6641" target="_blank">strptime(</a>) at 2.x version.</p>
<p>For example, if you invoke strptime(), It does not work as expected.</p>
<pre class="brush:py">from datetime import datetime

dt='Sat Jan 28 12:27:31 +0800 2012';
datetime.strptime(dt,'%a %b %d %H:%M:%S %z %Y')</pre>
<p>error shows as:  ValueError: &#8216;z&#8217; is a bad directive in format &#8216;%a %b %d %H:%M:%S %z %Y&#8217;</p>
<p>Then how can we convert string with timezone information to date?For example, given a date string &#8220;Sat Jan 28 12:27:31 +0800 2012&#8243;, you need the represented date. You can take the convenient of email.utils like this on python 2.x:</p>
<pre class="brush:py">import email.utils
from datetime import datetime

dt =u'Sat Jan 28 12:27:31 +0800 2012';

# parse the date string to several parts,
#  date_tz is a list: (2012, 1, 28, 12, 27, 31, 0, 1, -1, 28800)
date_tz = email.utils.parsedate_tz(dt);  

mydate=datetime(*date_tz[:6]);  # new a datetime by the first 6 elements of the list</pre>
<p>Footnote: I checked  python 3.2, the strptime works in the first snippet. You may reference the &#8220;<a title="what's new in python 3.2" href="http://docs.python.org/dev/whatsnew/3.2.html" target="_blank">What&#8217;s new in python 3.2</a>&#8220;.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F&amp;title=How+to+convert+string+with+timezone+info+to+date+in+python" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F&amp;title=How+to+convert+string+with+timezone+info+to+date+in+python" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F&amp;title=How+to+convert+string+with+timezone+info+to+date+in+python" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=How+to+convert+string+with+timezone+info+to+date+in+python&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=How+to+convert+string+with+timezone+info+to+date+in+python&amp;u=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=How+to+convert+string+with+timezone+info+to+date+in+python&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F&amp;title=How+to+convert+string+with+timezone+info+to+date+in+python&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.beyondlinux.com%2F2012%2F02%2F06%2Fhow-to-convert-string-with-timezone-info-to-date-in-python%2F" target="_blank"><img class="lightsocial_img" src="http://www.beyondlinux.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.beyondlinux.com/2012/02/06/how-to-convert-string-with-timezone-info-to-date-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
