<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Python on Dr. Hitesh Sarda</title>
		<link>https://hitesh.in/tags/python/</link>
		<description>Recent content in Python on Dr. Hitesh Sarda</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Mon, 13 Jun 2011 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://hitesh.in/tags/python/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Running a bottle.py app on Dreamhost</title>
				<link>https://hitesh.in/2011/running-a-bottle.py-app-on-dreamhost/</link>
				<pubDate>Mon, 13 Jun 2011 00:00:00 +0000</pubDate>
				<guid>https://hitesh.in/2011/running-a-bottle.py-app-on-dreamhost/</guid>
				<description>&lt;p&gt;I wrote the &lt;a href=&#34;http://stackmonthly.com/&#34;&gt;Stack Monthly&lt;/a&gt; site on the one file &lt;a href=&#34;http://bottlepy.org/&#34;&gt;Bottle framework&lt;/a&gt;, since my needs were really bare bones. But when I tried to get it running on Dreamhost, I had to struggle quite a lot, because there was no documentation to show how to do it.&lt;/p&gt;&#xA;&lt;p&gt;Only past midnight, did it dawn on me that there is no documentation, because it is so darn simple! So as a note to self, and to save someone an hour or two, here&amp;rsquo;s how to run a Bottle app on Dreamhost.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Django Flowchart</title>
				<link>https://hitesh.in/2009/django-flowchart/</link>
				<pubDate>Wed, 09 Dec 2009 00:00:00 +0000</pubDate>
				<guid>https://hitesh.in/2009/django-flowchart/</guid>
				<description>&lt;p&gt;Based on my current understanding of Django, this is how a user request is responded to.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://hitesh.in/2009/django-flowchart/images/120909_1217_DjangoFlowc1.png&#34; alt=&#34;Django Flowchart&#34; width=&#34;531&#34; height=&#34;699&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;User requests a page&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Request reaches &lt;em&gt;Request Middlewares&lt;/em&gt;, which could manipulate or answer the request&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The _URLConf_finds the related View using urls.py&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;em&gt;View Middlewares&lt;/em&gt; are called, which could manipulate or answer the request&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The &lt;em&gt;view&lt;/em&gt; function is invoked&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The view could optionally access data through models&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;All &lt;em&gt;model&lt;/em&gt;-to-DB interactions are done via a &lt;em&gt;manager&lt;/em&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Week with python &amp;amp; Django</title>
				<link>https://hitesh.in/2009/week-with-python-amp-django/</link>
				<pubDate>Sun, 06 Dec 2009 00:00:00 +0000</pubDate>
				<guid>https://hitesh.in/2009/week-with-python-amp-django/</guid>
				<description>&lt;p&gt;Spent the last week picking up Python and Django. Notes to self and anyone else who wants a quick start on Python/Django on Windows. Most Linux flavours already come with most tools needed for python development.&lt;/p&gt;&#xA;&lt;h3 id=&#34;requirements&#34;&gt;Requirements:&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Installed &lt;a href=&#34;http://downloads.activestate.com/ActivePython/windows/2.6/ActivePython-2.6.4.8-win32-x86.msi&#34;&gt;ActivePython 2.6&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Installed &lt;a href=&#34;http://downloads.activestate.com/Komodo/releases/5.2.3/Komodo-Edit-5.2.3-4312.msi&#34;&gt;Komodo Edit&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Installed &lt;a href=&#34;http://sourceforge.net/projects/pywin32/files/&#34;&gt;Python Win32 Extensions&lt;/a&gt; (not sure why, but was recommended in some blog post and the project itself does not say much of what it does. Stuff like this gives me the heebie-jeebies.)&lt;/li&gt;&#xA;&lt;li&gt;Installed &lt;a href=&#34;http://downloads.pinaxproject.com/Pinax-0.7.1-bundle.zip&#34;&gt;Pinax&lt;/a&gt;, which in turn installed Django.&lt;/li&gt;&#xA;&lt;li&gt;Installed &lt;a href=&#34;http://www.riverbankcomputing.com/software/pyqt/download&#34;&gt;PyQt4&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Installed &lt;a href=&#34;http://eric-ide.python-projects.org/eric4-download.html&#34;&gt;Eric4&lt;/a&gt; (uninstalled after using it for 10 minutes)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;problems-faced&#34;&gt;Problems faced:&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pinax installation was a bit flawed, it could not install all dependencies. Worked around by manually installing (pip install else easy_install)&lt;/li&gt;&#xA;&lt;li&gt;Windows 7 was not passing command line arguments to .py scripts. Had to hack registry and add &lt;strong&gt;%*&lt;/strong&gt; to the end to make it work. See the Key and value below.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hitesh.in/wp-content/uploads/2009/12/image.png&#34;&gt;&lt;img src=&#34;https://hitesh.in/2009/week-with-python-amp-django/images/image_thumb.png&#34; alt=&#34;Registry screenshot&#34; title=&#34;Registry screenshot&#34; width=&#34;640&#34; height=&#34;158&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/a&gt;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
