<?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>Desi Penguin’s Blog</title>
	<atom:link href="http://desipenguin.com/techblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://desipenguin.com/techblog</link>
	<description>Open source, Tech Tips, Reviews, Tutorials and more …</description>
	<lastBuildDate>Fri, 12 Feb 2010 17:26:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I can&#8217;t take it anymo&#8230;.</title>
		<link>http://desipenguin.com/techblog/2010/02/12/i-cant-take-it-anymo/</link>
		<comments>http://desipenguin.com/techblog/2010/02/12/i-cant-take-it-anymo/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 17:26:17 +0000</pubDate>
		<dc:creator>Mandar Vaze</dc:creator>
				<category><![CDATA[symbian]]></category>
		<category><![CDATA[Global Warming]]></category>
		<category><![CDATA[Memory effect]]></category>
		<category><![CDATA[Mobile phone]]></category>

		<guid isPermaLink="false">http://desipenguin.com/techblog/?p=354</guid>
		<description><![CDATA[I was wide awake when I heard the above words around midnight yesterday (it was 21 minutes past midnight to be precise)
For a while I didn&#8217;t realize what is going on, or who is saying this &#8230; Then I realized that it was my cell phone saying this. (No, I wasn&#8217;t hallucinating.) Recently I bought  [...]]]></description>
			<content:encoded><![CDATA[<p>I was wide awake when I heard the above words around midnight yesterday (it was 21 minutes past midnight to be precise)</p>
<p>For a while I didn&#8217;t realize what is going on, or who is saying this &#8230; Then I realized that it was my cell phone saying this. (No, I wasn&#8217;t hallucinating.) Recently I bought  a <a class="zem_slink" title="Nokia 5800 XpressMusic" rel="wikipedia" href="http://en.wikipedia.org/wiki/Nokia_5800_XpressMusic">Nokia 5800</a> xPressMusic phone.  I downloaded this software called &#8220;<a href="http://store.ovi.com/content/18547?clickSource=browse&amp;contentArea=applications" target="_blank">Green Charging Save Energy</a>&#8220;.</p>
<div class="wp-caption alignleft" style="width: 202px"><a href="http://store.ovi.com/content/18547?clickSource=browse&amp;contentArea=applications"><img title="Green Charging Save Energy" src="http://nds2.fds-download.nokia.com/fdp/interface/DC_OviStore/256x256___4-192x192_.png?fid=A0D63WLHLVMJDC" alt="Green Charging Save Energy" width="192" height="192" /></a><p class="wp-caption-text">Green Charging Save Energy</p></div>
<blockquote><p>The Description reads :</p>
<p>Green Charging is an application that will assist you in saving power  and hence, assists in curbing <a class="zem_slink" title="Global warming" rel="wikipedia" href="http://en.wikipedia.org/wiki/Global_warming">Global Warming</a>. This unique application  will be useful when the user will charge his/ her phone. <strong>The application  will notify the user (with sound effects) when the battery is fully  charged.</strong> Green charging will also share other important information like  the battery status, stand by time and talk-time (in %).     Why Green Charging? Saves Money Prevents Global Warming For a Greener Planet</p></blockquote>
<p>So what had happened was that battery meter on my cell phone was showing only single bar since the morning. Thanks to this application, I knew that even if the indicator said low battery, it would definitely last me the entire day (and it did). So finally when I was about to sleep, I hooked the cell phone to the charger. Generally I turn it off just when I am about to fall asleep, but yesterday I forgot. So after say about an hour or so, the battery was fully charged, and I was told &#8220;with the sound effects&#8221; that I need to turn off the charger.</p>
<p>Here are some of my views of the whole thing:</p>
<ul>
<li>I think it is a great application. Even if I am not convinced if leaving the charger ON even when phone is not connected, consumes/wastes electricity, I think it is generally great idea, not to overcharge the cellphone battery.</li>
<li>It is said that one should charge the battery only after it is fully (or near fully) drained. This helps prolong the battery life, and avoid &#8220;<a class="zem_slink" title="Memory effect" rel="wikipedia" href="http://en.wikipedia.org/wiki/Memory_effect">memory effect</a>&#8220;.  The app is very useful is helping me decide whether I really need to charge the battery immediately or can I wait.</li>
<li>While &#8220;I can&#8217;t take it anymo&#8230;&#8221; has a dramatic effect, it may not be appropriate sound effect for all the cases. There isn&#8217;t any obvious way to turn off the sound effects or to change it to something less dramatic. (Is someone from Impetus Infotech listening ? )</li>
</ul>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.slate.com/id/2234009/?from=rss">Four essential tips for extending the battery life of your computer, cell phone, and every other gadget.</a> (slate.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/763e5658-1e20-4344-8bae-9c5d12f0c31f/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=763e5658-1e20-4344-8bae-9c5d12f0c31f" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://desipenguin.com/techblog/2010/02/12/i-cant-take-it-anymo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To : Turn off Email Notifications in Outlook</title>
		<link>http://desipenguin.com/techblog/2009/11/24/how-to-turn-off-email-notifications-in-outlook/</link>
		<comments>http://desipenguin.com/techblog/2009/11/24/how-to-turn-off-email-notifications-in-outlook/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 16:43:04 +0000</pubDate>
		<dc:creator>Mandar Vaze</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://desipenguin.com/techblog/?p=342</guid>
		<description><![CDATA[When I moved from manager&#8217;s role to that of Technical contributor, I realized that for Individual contributor, getting a continuous span of undisturbed time is very important to get something worth while done. At times like this, email notifications can be distraction that needs to be turned off.
Most of us are conditioned to respond to [...]]]></description>
			<content:encoded><![CDATA[<p>When I moved from manager&#8217;s role to that of Technical contributor, I realized that for Individual contributor, getting a continuous span of undisturbed time is very important to get something worth while done. At times like this, email notifications can be distraction that needs to be turned off.</p>
<p>Most of us are conditioned to respond to (or at least read) every email sent you immediately. But over a period of time, you realize the not every email needs immediate attention. While communication is important, the method need not always be email. If something is really time critical, (I have observed that) people you reach you by other means as well (apart from the email they sent you) Other emails are important by not time critical.</p>
<p>Default settings in outlook are to notify you (in multiple ways) of new email in your inbox. But do not need to know about each and every single email the instance it reaches your inbox. You can turn off these distractions by turning off the email notifications completely. But it is hidden very well by Microsoft <img src='http://desipenguin.com/techblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To turn off these notifications, navigate to the following location:</p>
<blockquote><p>Tools-&gt;Options-&gt;Preferences-&gt;Email Options-&gt;Advanced Email Options</p></blockquote>
<p>Now you will see screen similar to the one below. Uncheck all these check boxes.</p>
<div id="attachment_346" class="wp-caption aligncenter" style="width: 378px"><img class="size-full wp-image-346" title="Outlook Setting Window" src="http://desipenguin.com/techblog/wp-content/uploads/2009/11/turn-off-email-distractions.JPG" alt="Turn Off Email Notifications" width="368" height="132" /><p class="wp-caption-text">Turn Off Email Notifications</p></div>
<p>While the above screen shot (and the location to reach this option) is taken from Outlook 2007, Options for other versions of outlook shouldn&#8217;t be very different.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/60f852b5-d01c-48c8-89b3-f2278cb21558/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=60f852b5-d01c-48c8-89b3-f2278cb21558" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://desipenguin.com/techblog/2009/11/24/how-to-turn-off-email-notifications-in-outlook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Importing CSV file data into sqlite3</title>
		<link>http://desipenguin.com/techblog/2009/07/13/importing-csv-file-data-into-sqlite3/</link>
		<comments>http://desipenguin.com/techblog/2009/07/13/importing-csv-file-data-into-sqlite3/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 15:41:16 +0000</pubDate>
		<dc:creator>Mandar Vaze</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Comma-separated values]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[sqlite3]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://desipenguin.com/techblog/?p=327</guid>
		<description><![CDATA[



Image via Wikipedia



I was trying to import the data from CSV file into sqlite3 database. Ideally this should be very simple task, with following the steps given in the sqlite tutorial. It is a matter of calling the sqlite command with separator argument, followed by an import operation, as listed below.

sqlite3 test.db  "create table [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignleft" style="width: 223px;">
<dt class="wp-caption-dt"><a href="http://commons.wikipedia.org/wiki/Image:SQLite_Logo_4.png"><img title="The :en:SQLite logo as of 2007-12-15" src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/SQLite_Logo_4.png/300px-SQLite_Logo_4.png" alt="The :en:SQLite logo as of 2007-12-15" width="213" height="63" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://commons.wikipedia.org/wiki/Image:SQLite_Logo_4.png">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>I was trying to import the data from <a class="zem_slink" title="Comma-separated values" rel="wikipedia" href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV</a> file into <a class="zem_slink" title="SQLite" rel="homepage" href="http://www.sqlite.org/">sqlite3</a> database. Ideally this should be very simple task, with following the steps given in the sqlite tutorial. It is a matter of calling the sqlite command with separator argument, followed by an import operation, as listed below.</p>
<blockquote>
<pre>sqlite3 test.db  "create table t1 (t1key INTEGER PRIMARY KEY,data TEXT);"
sqlite3 -separator , test.db ".import some.csv t1"</pre>
</blockquote>
<p>Except that main attribute of my CSV file was that it could contain single records with embedded comma. I was hoping that sqlite3 would be smart enough to detect that the fields were enclosed within double quotes and then separate by comma. But I soon realized that only a code specifically dealing with CSV would know about this.  As we can see in the example above, the import is a generic code and as a user I listed comma as a separator.</p>
<p>My Data looked something like this :</p>
<blockquote>
<pre>"1","data1"
"2","data2,data3"</pre>
</blockquote>
<p>So like  any *nix geek would do, I tried  providing double quote <strong>and</strong> comma as a separator. To my surprise it worked very well. I though separator would take only single character, and I had provided two (three?). Anyway, important thing to remember is to escape the single quote with a <a class="zem_slink" title="Backslash" rel="wikipedia" href="http://en.wikipedia.org/wiki/Backslash">backslash</a> (I didn&#8217;t try it without the backslash, may be that would work too)</p>
<p>So here is the syntax that worked :</p>
<blockquote>
<pre>sqlite3 -separator \", test.db ".import mydata.csv mytbl"</pre>
</blockquote>
<p><em>Update : Turns out <a href="http://code.google.com/p/sqlite-manager/downloads/list" target="_blank">SQLite Manager</a> is much better solution after all.  It is an </em><em><a id="project_summary_link" style="text-decoration: none; color: #000000;" href="http://code.google.com/p/sqlite-manager/">Extension for Firefox and other apps to manage any sqlite database.</a></em><em> Not only it took care of above situation, it also handled empty cells as well where the command line failed with following error message : </em></p>
<blockquote>
<pre><em>line 4: expected 3 columns of data but found 2</em></pre>
</blockquote>
<p><em>Data with missing cells : Notice two successive commas :</em></p>
<blockquote>
<pre><em>"1","data1","data2"
"2","data3,data4","data5"
"3",,"data6"</em></pre>
</blockquote>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/037f00cf-f2be-47cc-89d4-863c249a4f99/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=037f00cf-f2be-47cc-89d4-863c249a4f99" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://desipenguin.com/techblog/2009/07/13/importing-csv-file-data-into-sqlite3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why SharpDevelop is better IDE ?</title>
		<link>http://desipenguin.com/techblog/2009/07/10/why-sharpdevelop-is-better-ide/</link>
		<comments>http://desipenguin.com/techblog/2009/07/10/why-sharpdevelop-is-better-ide/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 16:51:26 +0000</pubDate>
		<dc:creator>Mandar Vaze</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://desipenguin.com/techblog/?p=316</guid>
		<description><![CDATA[



Image via Wikipedia



In my first post about IronPython, I documented how installing IronPython Studio was painful (Needed Visual Studio shell, which in itself was confusing). When I started with IronPython I did not know about any other IDE, hence I went ahead with IronPython Studio. But later I came to know about SharpDevelop.
My initial problem [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignleft" style="width: 266px;">
<dt class="wp-caption-dt"><a href="http://en.wikipedia.org/wiki/Image:SharpDevelop.png"><img title="SharpDevelop" src="http://upload.wikimedia.org/wikipedia/en/thumb/b/b6/SharpDevelop.png/300px-SharpDevelop.png" alt="SharpDevelop" width="256" height="177" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:SharpDevelop.png">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>In my <a href="http://desipenguin.com/techblog/2009/06/23/ironpython/" target="_blank">first post</a> about <a class="zem_slink" title="IronPython" rel="homepage" href="http://www.codeplex.com/IronPython">IronPython</a>, I documented how installing IronPython Studio was painful (Needed Visual Studio shell, which in itself was confusing). When I started with IronPython I did not know about any other IDE, hence I went ahead with IronPython Studio. But later I came to know about <a class="zem_slink" title="SharpDevelop" rel="homepage" href="http://sharpdevelop.com/">SharpDevelop</a>.</p>
<p>My initial problem with SharpDevelop was that it needed .NET 3.5 SP1 at the minimum. I had just gone through the painful exercise of downloading and installing the prerequisites for IronPython Studio. So I was in no mood of downloading another big chunk before I can start my IronPython Development. But once I got past my initial development cycle, I wanted to give Sharp Develop a try.</p>
<p>After using both the ID interchangeably, I finally settled on SharpDevelop as my choice for IronPython Development</p>
<h3><span id="more-316"></span></h3>
<h3>Why SharpDevelop ?</h3>
<blockquote><p><strong>#develop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects</strong> on Microsoft&#8217;s .NET platform</p></blockquote>
<p>To begin with it is completely free and open source. We like Open Source.  But IronPython Studio is also Free and Open Source. But it needs Visual Studio shell from MS.  There is nothing wrong with that, I think it is a design philosophy. IronPython Studio was probably built with the sole purpose of supporting IronPython IDE. So the developers must have assumed that anyone doing development on MS platform would typically use Visual Studio. Since MS has a free version of Visual Studio, cost is non-issue. That is why IronPython Studio is available in two modes : integrated mode and isolated mode.  Assuming that existence of Visual Studio shell helps in reducing the download size. While IronPython Studio was less than 1MB, Sharp Develop on the other hand is whopping 18 MB.</p>
<p>On the other hand, SharpDevelop was built from ground up with the goal of providing a completely open source alternative to Visual Studio. As the name suggests, probably very first language it supported was C#, and then added support for VB.NET and Boo (and IronPython as of 3.0) one by one.</p>
<h3>Support for Visual Studio Solution files</h3>
<p>While SharpDevelop aims to be complete alternative for Visual Studio, I think they realize that in real world there are bound to be projects which already have .sln files. So it is important to support .sln files. IronPython Studio on the other hand insists on creating its own .pysln files.</p>
<p>While .pysln may be OK for Standalone IronPython Development, SharpDevelop approach of supporting solution files will be useful when one tries to use IronPython code with other .NET languages like VB.Net and C# (To be fair both use .pyproj project files, which can be open interchangeably in any IDE &#8211; But IronPython Studio insisted on creating its own .pysln file when it opened .pyproj)</p>
<p>While I have not used integrated mode of IronPython Studio, SharpDevelop inherently supports multiple .NET languages. It also has feature to convert VB.net code into IronPython. Now how cool is that ?</p>
<h3>Third party tools</h3>
<p>One of the menu items in SharpDevelop is titled &#8220;Quality Tools&#8221;. I liked the fact that an IDE cares enough about the quality to integrate various third party tools. It has built in option for Profiler, <a class="zem_slink" title="StyleCop" rel="wikipedia" href="http://en.wikipedia.org/wiki/StyleCop">StyleCop</a>, <a class="zem_slink" title="FxCop" rel="wikipedia" href="http://en.wikipedia.org/wiki/FxCop">FxCop</a>, as well as <a class="zem_slink" title="NUnit" rel="homepage" href="http://www.nunit.com/">NUnit</a>.  Some of these tools require a third party DLL to work, but that is fair enough.</p>
<p>SharpDevelop also recognized that <a class="zem_slink" title="TortoiseSVN" rel="homepage" href="http://tortoisesvn.tigris.org">TortoiseSVN</a> was installed and supported Subversion operations from within the IDE. On the other hand,  free Visual Studio plugin for SVN &#8211; <a class="zem_slink" title="AnkhSVN" rel="homepage" href="http://ankhsvn.net/">AnkhSVN</a> &#8211; doesn&#8217;t work with free (Express) version of Visual Studio.</p>
<p>So does that mean SharpDevelop is the ultimate IDE for IronPython development ? Not quite. There are certain things that didn&#8217;t quite work for me.</p>
<h3>Code completion missing ?</h3>
<p>Since most of my development has been on *nix platform, I haven&#8217;t used much of IDEs. I used Eclipse once is a while for some Java Development, but always felt it to be slow. For pure Python development, I prefer <a class="zem_slink" title="ActiveState Komodo" rel="homepage" href="http://www.activestate.com/komodo/">Komodo free IDE</a> on both Ubuntu as well as Windows.  I have also tried Eclipse 3.5 with built-in support for Dynamic languages for Python development on Ubuntu. But none of these provided the auto completion (or intellisense as sometimes it is referred) feature for python/ironpython. I read on one of the blogs that SharpDevelop 3.1 supports code completion for IronPython, but for some reason I was not able to get it working for me (Please let me know in comments, if you know of any configuration that may be required for this)</p>
<h3>Folding doesn&#8217;t quite work</h3>
<p>Another big feature I missed (as compated to Komodo free version) was how folding worked. SharpDevelop support folding only for the code inside a class. Most of code is outside of any of the classess &#8211; so I get no folding. Komodo on the other hand support folding for as small as if block.</p>
<h3>Closing Remarks</h3>
<p>In coming days, I need to integrate my code with VB.Net application. I plan to use SharpDevelop for the entire development. If my colleagues can&#8217;t figure out that I am not using Visual Studio, I may suggest the rest of the development team to also try SharpDevelop (and save some buck for the organization &#8211; that would be pretty big saving)</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 460px; width: 1px; height: 1px;">in comments</div>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/41035723-ab8c-4afa-a80a-aa40c8e97aae/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=41035723-ab8c-4afa-a80a-aa40c8e97aae" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://desipenguin.com/techblog/2009/07/10/why-sharpdevelop-is-better-ide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reading CSV files in IronPython</title>
		<link>http://desipenguin.com/techblog/2009/07/03/reading-csv-files-in-ironpython/</link>
		<comments>http://desipenguin.com/techblog/2009/07/03/reading-csv-files-in-ironpython/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 16:13:12 +0000</pubDate>
		<dc:creator>Mandar Vaze</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[IronPython]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://desipenguin.com/techblog/?p=294</guid>
		<description><![CDATA[



Image via Wikipedia



This is in continuation with my previous blog post :
To get IronPython to use Standard Python Modules,  one needs to add  the following two lines to C:\IronPython-2.0.1\Lib\site.py :
import sys
sys.path.append(r"C:\Python25\Lib")
While this works for most part, it doesn’t help if you are using Python extensions written in C. More about my specific problems in [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 123px;">
<dt class="wp-caption-dt"><a href="http://en.wikipedia.org/wiki/Image:CsvDelimited001.svg"><img title="stylized depiction of a csv text file" src="http://upload.wikimedia.org/wikipedia/en/thumb/3/38/CsvDelimited001.svg/113px-CsvDelimited001.svg.png" alt="stylized depiction of a csv text file" width="113" height="113" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:CsvDelimited001.svg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>This is in continuation with my <a href="http://desipenguin.com/techblog/2009/06/23/ironpython/" target="_blank">previous</a> blog post :</p>
<blockquote><p><span>To get <a class="zem_slink" title="IronPython" rel="homepage" href="http://www.codeplex.com/IronPython">IronPython</a> to use Standard <a class="zem_slink" title="Python (programming language)" rel="homepage" href="http://www.python.org/">Python</a> Modules,  one needs to</span> add  the following two lines to <em>C:\IronPython-2.0.1\Lib\site.py</em> :</p>
<pre>import sys
sys.path.append(r"C:\Python25\Lib")</pre>
<p>While this works for most part, it doesn’t help if you are using Python extensions written in C. More about my specific problems in another post. But there is an open source project <a href="http://code.google.com/p/ironclad/" target="_blank">IronClad</a> to deal specifically with this issue. In the meantime, you can check  <a href="http://ironpython.codeplex.com/Wiki/View.aspx?title=Differences" target="_blank">the differences between IronPython and CPython</a></p></blockquote>
<p>Reading (and writing to) <a class="zem_slink" title="Comma-separated values" rel="wikipedia" href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV</a> file is critical part of my program, while in stadard python it was as easy as &#8220;import csv&#8221;, the same thing took some efforts to get it working in IronPython. I got the following error for my import statement</p>
<pre>Error on line 7 in csv.py
from functools import reduce</pre>
<p>I also tried using <a class="zem_slink" title="ActivePython" rel="wikipedia" href="http://en.wikipedia.org/wiki/ActivePython">ActiveState Python</a> 2.5.2.2 (which I already had from few months ago, didn&#8217;t feel like downloading the latest version till the problem was fixed) But that didn&#8217;t help either. With ActiveState, I got the same error on the same line, except this time it was for _csv.</p>
<p>To Quote from <a href="http://www.ironpython.info/index.php/Reading_CSV_Files" target="_blank">IronPython Cookbook</a> :</p>
<blockquote><p>For some reason the Python standard library <a class="external text" title="http://docs.python.org/lib/module-csv.html" href="http://docs.python.org/lib/module-csv.html">csv module</a> is written in C, which means that it isn&#8217;t available to IronPython.</p></blockquote>
<p>The cookbook points to a third party library called <a href="http://www.codeproject.com/KB/database/CsvReader.aspx" target="_blank">A Fast Csv Reader</a> . The cookbook has a nice example of how to use the said DLL with your IronPython Program.</p>
<p>It wasn&#8217;t clear to me as to why I had to register at Code Project to download this binary since it is provided under <a href="http://en.wikipedia.org/wiki/MIT_License" target="_blank">MIT Open Source License</a>. But whom am I gonna complain to ? Beggars can&#8217;t be choosers <img src='http://desipenguin.com/techblog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/97b6f3b5-f068-4b14-accd-9a79a802c586/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_b.png?x-id=97b6f3b5-f068-4b14-accd-9a79a802c586" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://desipenguin.com/techblog/2009/07/03/reading-csv-files-in-ironpython/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
