<?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 &#187; Microsoft Visual Studio</title>
	<atom:link href="http://desipenguin.com/techblog/tag/microsoft-visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://desipenguin.com/techblog</link>
	<description>Open source, Tech Tips, Reviews, Tutorials and more …</description>
	<lastBuildDate>Thu, 12 Jan 2012 18:16:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IronPython</title>
		<link>http://desipenguin.com/techblog/2009/06/23/ironpython/</link>
		<comments>http://desipenguin.com/techblog/2009/06/23/ironpython/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 17:11:23 +0000</pubDate>
		<dc:creator>Mandar Vaze</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[IronPython]]></category>
		<category><![CDATA[Microsoft Visual Studio]]></category>

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



Image by Michael Foord via Flickr



After working on initial prototype using pylons, on ubuntu, my employer needed a standalone application (on windows) So I was looking for ways to reuse my python code to avoid double work.  had only heard about iron python but beyond that I did not know anything more.
A bit of research [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignleft" style="width: 138px;">
<dt class="wp-caption-dt"><a href="http://www.flickr.com/photos/13483019@N00/3225539390"><img title="IronPython in Action" src="http://farm4.static.flickr.com/3428/3225539390_e512d00174_m.jpg" alt="IronPython in Action" width="128" height="160" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image by <a href="http://www.flickr.com/photos/13483019@N00/3225539390">Michael Foord</a> via Flickr</dd>
</dl>
</div>
</div>
<p>After working on initial prototype using <a class="zem_slink" title="Pylons (web framework)" rel="homepage" href="http://www.pylonshq.com/">pylons</a>, on ubuntu, my employer needed a standalone application (on windows) So I was looking for ways to reuse my python code to avoid double work.  had only heard about iron python but beyond that I did not know anything more.</p>
<p>A bit of research later, I downloaded IronPython from <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython" target="_blank">here</a> and<a href="http://www.codeplex.com/IronPythonStudio" target="_blank"> IronPython Studio</a>. I was quite thrilled to find out that Microsoft, has created this shell, which allows developers to integrate new languages with Visual Studio Shell.</p>
<h2>Installing IronPython Studio</h2>
<p>Installing IronPython was very straight forward. Considering it is one of the Python implementation itself, you don&#8217;t have to have standard python installed. (But I did, more on that later)</p>
<p>Setting up IronPython Studio wasn&#8217;t so straight forward.  I had to download standalone version of Visual Studio shell. But the problem, and it is well documented, is that installing the redistributable package in itself is not the complete step, as you would believe from the website. I confirmed that the package was installed, and stil IronPython Studio would complain, and refuse to proceed. It turns out that you need to install the Visual Studio environment, which is inside this directory structure you just created.</p>
<div id="attachment_290" class="wp-caption aligncenter" style="width: 613px"><img class="size-full wp-image-290" title="Visual Studio Redistributable Package " src="http://desipenguin.com/techblog/wp-content/uploads/2009/06/VS2K8-Isolated.JPG" alt="This is NOT enough" width="603" height="97" /><p class="wp-caption-text">This is NOT enough</p></div>
<div id="attachment_291" class="wp-caption aligncenter" style="width: 612px"><img class="size-full wp-image-291" title="Visual Studio Shell 2008" src="http://desipenguin.com/techblog/wp-content/uploads/2009/06/VS-Shell2K8.JPG" alt="This is what IronPython Studio needs" width="602" height="97" /><p class="wp-caption-text">This is what IronPython Studio needs</p></div>
<p>Once I installed Visual Studio Shell, IronPython Studio installed easily.  Using IronPython has been nice experience in just a few hours I have been using it. The Code completion isn&#8217;t upto my liking yet, but it is helpful at times.</p>
<h2>Using Standard Python Libraries</h2>
<p>Since my original code was written on linux, it used only the standard python modules. In a manner of speaking, it was &#8220;pure&#8221; python code. Since <em>IronPython is </em><span id="ctl00_ctl00_MasterContent_Content_wikiSourceLabel"><em>an implementation of the Python programming language running under .NET</em>, it was obivious that my code may not work as is. But I&#8217;m glad that I did not have to make too many changes to get it working under IronPython. </span></p>
<p><span>As is well documented in IronPython Tutorial, it is not very difficult to use standard python libraries with IronPython (with a few exceptions &#8211; more about this a little later) To get IronPython to use Standard Python 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&#8217;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>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 289px; width: 1px; height: 1px;">http://www.codeplex.com/IronPythonStudio</div>
<p><strong>Related articles</strong></p>
<ul>
<li><a href="http://blogs.msdn.com/hugunin/archive/2009/04/14/ironpython-in-action.aspx"> IronPython in Action </a> (blogs.msdn.com)</li>
<li><a href="http://www.mehmetalierturk.com/2009/05/04/why-python/"> Why Python? </a> (mehmetalierturk.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/d57dd1e2-9cff-474f-9b2e-8f575bf5d8b3/"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_b.png?x-id=d57dd1e2-9cff-474f-9b2e-8f575bf5d8b3" 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/06/23/ironpython/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

