<?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>Strong as an Ox &#187; ironpython</title>
	<atom:link href="http://www.strongasanox.co.uk/tag/ironpython/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.strongasanox.co.uk</link>
	<description>Ian Oxley - ASP.NET, PHP, JavaScript and Web Applications</description>
	<lastBuildDate>Tue, 24 Aug 2010 22:54:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to check if an assembly was compiled in debug or release mode</title>
		<link>http://www.strongasanox.co.uk/2010/01/08/how-to-check-if-an-assembly-was-compiled-in-debug-or-release-mode/</link>
		<comments>http://www.strongasanox.co.uk/2010/01/08/how-to-check-if-an-assembly-was-compiled-in-debug-or-release-mode/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 17:18:44 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[devtools]]></category>
		<category><![CDATA[ironpython]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/?p=276</guid>
		<description><![CDATA[I came across this nifty bit of code the other day when looking for a way to do this and, just for fun, thought I&#8217;d convert it to IronPython. So I did. And here it is: import System def is_assembly_debug_build(filename): """Returns true if filename appears to have been built in debug mode""" result = False [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this <a href="http://chillijam.co.uk/2006/05/04/determine-if-an-assembly-is-a-debug-or-release-build/">nifty bit of code</a> the other day when looking for a way to do this and, just for fun, thought I&#8217;d convert it to <a href="http://ironpython.net/">IronPython</a>. So I did. And here it is:</p>
<pre>import System

def is_assembly_debug_build(filename):
	"""Returns true if filename appears to have been built in debug mode"""
	result = False
	dll = System.Reflection.Assembly.LoadFile(filename)
	customAttribs = dll.GetCustomAttributes(False)
	for att in customAttribs:
		if att.GetType() == System.Type.GetType("System.Diagnostics.DebuggableAttribute"):
			result = att.IsJITTrackingEnabled
	return result</pre>
<p>I saved this in a file called diagnostics.py. So using it (you&#8217;ll need to be in the same directory as diagnostics.py or have added diagnostics.py to your path &#8211; more info can be found here: <a href="http://docs.python.org/tutorial/modules.html#the-module-search-path">http://docs.python.org/tutorial/modules.html#the-module-search-path</a>) is simply a matter of doing something like this:</p>
<pre>from diagnostics import is_assembly_debug_build
is_assembly_debug_build([absolute_path_to_your_dll])</pre>
<p>If you&#8217;re interested you can grab a copy of diagnostics.py from <a href="http://gist.github.com/206177">http://gist.github.com/206177</a></p>
<p>Have fun <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2010/01/08/how-to-check-if-an-assembly-was-compiled-in-debug-or-release-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Started With IronPython on Silverlight 2.0</title>
		<link>http://www.strongasanox.co.uk/2008/03/09/get-started-with-ironpython-on-silverlight-20/</link>
		<comments>http://www.strongasanox.co.uk/2008/03/09/get-started-with-ironpython-on-silverlight-20/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 14:36:02 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[silverlight]]></category>
		<category><![CDATA[ironpython]]></category>

		<guid isPermaLink="false">http://ianoxley.wordpress.com/?p=11</guid>
		<description><![CDATA[If you want to have a go with IronPython on Silverlight 2.0, you could do worse than to follow the advice in this article. Although the example is rather simplistic it should get you up and running in no time. As the Chiron tool is in the Microsoft SDK&#8217;s folder, I am presuming that you [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to have a go with IronPython on Silverlight 2.0, you could do worse than to follow <a href="http://silverlight.net/quickstarts/ProgramDlr.aspx">the advice in this article</a>. Although the example is rather simplistic it should get you up and running in no time.</p>
<p>As the Chiron tool is in the Microsoft SDK&#8217;s folder, I am presuming that you will need to install the Silverlight 2.0 SDK first (as well as the Silverlight 2.0 runtime of course). These can be downloaded from here:</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4E03409A-77F3-413F-B108-1243C243C4FE&amp;displaylang=en">Silverlight 2.0 Runtime</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4E03409A-77F3-413F-B108-1243C243C4FE&amp;displaylang=en">Silverlight 2.0 SDK</a></li>
</ul>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2008/03/09/get-started-with-ironpython-on-silverlight-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up the Silverlight DLRConsole on Apache</title>
		<link>http://www.strongasanox.co.uk/2008/02/29/setting-up-the-silverlight-dlrconsole-on-apache/</link>
		<comments>http://www.strongasanox.co.uk/2008/02/29/setting-up-the-silverlight-dlrconsole-on-apache/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 23:52:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ironpython]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://ianoxley.wordpress.com/?p=10</guid>
		<description><![CDATA[If, like me, you fancied playing around with IronPython and Silverlight on Apache, here&#8217;s how I got mine set-up: Download and unpack DLRConsole.zip from http://silverlight.net/Samples/1.1/DLR-Console/DLRConsole.zip Added the following to my Apache httpd.conf file: &#60;VirtualHost 127.0.0.1&#62;   ServerName DLRConsole   DocumentRoot "C:/dev/DLRConsole"   AddType text/python .py   AddType text/jscript .jsx          DirectoryIndex index.htm index.html &#60;/VirtualHost&#62; &#60;Directory "C:/dev/DLRConsole"&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>If, like me, you fancied playing around with IronPython and Silverlight on Apache, here&#8217;s how I got mine set-up:</p>
<ol>
<li>Download and unpack DLRConsole.zip from <a HREF="http://silverlight.net/Samples/1.1/DLR-Console/DLRConsole.zip">http://silverlight.net/Samples/1.1/DLR-Console/DLRConsole.zip</a></li>
<li>Added the following to my Apache httpd.conf file:
<pre><code> &lt;VirtualHost 127.0.0.1&gt;
         ServerName DLRConsole
         DocumentRoot "C:/dev/DLRConsole"
         AddType text/python .py
         AddType text/jscript .jsx

         DirectoryIndex index.htm index.html
&lt;/VirtualHost&gt;

&lt;Directory "C:/dev/DLRConsole"&gt;
         Options Indexes MultiViews
         AllowOverride None
         Order allow,deny
         Allow from all

         DirectoryIndex index.htm index.html
&lt;/Directory&gt;
</code></pre>
</li>
<li> I also set up the following in my hosts file (typically located on Windows at C:WINDOWSSYSTEM32DRIVERSETCHOSTS):<br />
127.0.0.1 dlrconsole</li>
<li>Re-start Apache and point your browser to http://dlrconsole</li>
</ol>
<p>You may need to comment out any other Python handlers in you httpd.conf file and add them on a per &lt;Directory&gt; basis, but obviously if you’ve got loads of Python-based sites on your Apache installation then your mileage may vary. Fortunately this wasn’t an issue for me so the following was sufficient:</p>
<p><code>AddHandler cgi-script .pl<br />
#AddHandler cgi-script .py</code></p>
<p>For more on the DLRConsole see <a HREF="http://msdn2.microsoft.com/en-us/magazine/cc163284.aspx">this article</a> from MSDN Magazine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2008/02/29/setting-up-the-silverlight-dlrconsole-on-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
