<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Python vs. IronPython : Round 2</title>
	<atom:link href="http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/</link>
	<description>AJAX, Maps, .NET, and Destruction</description>
	<lastBuildDate>Wed, 30 Sep 2009 12:59:13 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bill Thorp</title>
		<link>http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-68</link>
		<dc:creator>Bill Thorp</dc:creator>
		<pubDate>Tue, 19 Jun 2007 20:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-68</guid>
		<description>Oh, and 44k meant 44kB, not 44,000 lines or 44 kilos of code.  44 kilos is a *lot of code*!</description>
		<content:encoded><![CDATA[<p>Oh, and 44k meant 44kB, not 44,000 lines or 44 kilos of code.  44 kilos is a *lot of code*!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Thorp</title>
		<link>http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-67</link>
		<dc:creator>Bill Thorp</dc:creator>
		<pubDate>Tue, 19 Jun 2007 20:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-67</guid>
		<description>Christopher,

Urllib2 uses both hashlib and sockets.  Neither work right in IronPython, and I can&#039;t seem to get them working with FePy either.  I replaced &quot;os.access&quot; calls with its partial equivalent &quot;os.path.exists&quot; (which pulls from ntpath.py on windows).  That worked enough to validate that sockets was an issue.  Even pointing at FePy&#039;s libs, I can&#039;t reference &quot;socket._fileobject.&quot;  I can see the code, and FePy talks about fixing this, but I&#039;m clueless as to what I&#039;m doing wrong.

Basically, I&#039;m not sure IronPython support in TileCache is worth worrying about yet.  In 6 months, all these issues should be resolved, and things &quot;just work&quot;.</description>
		<content:encoded><![CDATA[<p>Christopher,</p>
<p>Urllib2 uses both hashlib and sockets.  Neither work right in IronPython, and I can&#8217;t seem to get them working with FePy either.  I replaced &#8220;os.access&#8221; calls with its partial equivalent &#8220;os.path.exists&#8221; (which pulls from ntpath.py on windows).  That worked enough to validate that sockets was an issue.  Even pointing at FePy&#8217;s libs, I can&#8217;t reference &#8220;socket._fileobject.&#8221;  I can see the code, and FePy talks about fixing this, but I&#8217;m clueless as to what I&#8217;m doing wrong.</p>
<p>Basically, I&#8217;m not sure IronPython support in TileCache is worth worrying about yet.  In 6 months, all these issues should be resolved, and things &#8220;just work&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Schmidt</title>
		<link>http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-65</link>
		<dc:creator>Christopher Schmidt</dc:creator>
		<pubDate>Tue, 19 Jun 2007 12:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-65</guid>
		<description>I would assume that the &#039;os.access&#039; method is brought in by &quot;from posix import *&quot; on CPython, which seems to have the access method -- the reason for using os.access is that it should work on all platforms. The top of os.py in CPython has imports for &#039;nt&#039;, &#039;mac&#039;, &#039;ce&#039;, &#039;riscos&#039;, and &#039;posix&#039; -- I&#039;m guessing that the IronPython equivalent is missing those?

There must be some method of determining whether a file exists: if you wanted to, you could create a subclass of DiskCache (IronPythonDiskCache) and replace the __init__, __set__ and __delete__ methods. (If os.makedir is also missing, you might need to replace the attemptLock function too.)

Also, I&#039;m not sure which 44k of code you&#039;re talking about, but the TileCache Python files (minus examples, docs, etc.) are only 1200:

disciplina:~/tilecache-1.8.1/TileCache crschmidt$ ls
Cache.py        Client.py       Layer.py        Service.py      __init__.py
disciplina:~/tilecache-1.8.1/TileCache crschmidt$ wc -l *
     154 Cache.py
     115 Client.py
     418 Layer.py
     526 Service.py
       5 __init__.py
    1218 total

So it&#039;s even worse than you suspected :)

Out of curiosity, where is _hashlib getting imported from? Is it something we can drop out of TileCache in the main branch? I&#039;d like to TC and make it work on IronPython out of the box if possible, rather than having a forked project -- if there&#039;s ways we can test for IronPython and change some of our behavior, I&#039;d love to see them.</description>
		<content:encoded><![CDATA[<p>I would assume that the &#8216;os.access&#8217; method is brought in by &#8220;from posix import *&#8221; on CPython, which seems to have the access method &#8212; the reason for using os.access is that it should work on all platforms. The top of os.py in CPython has imports for &#8216;nt&#8217;, &#8216;mac&#8217;, &#8216;ce&#8217;, &#8216;riscos&#8217;, and &#8216;posix&#8217; &#8212; I&#8217;m guessing that the IronPython equivalent is missing those?</p>
<p>There must be some method of determining whether a file exists: if you wanted to, you could create a subclass of DiskCache (IronPythonDiskCache) and replace the __init__, __set__ and __delete__ methods. (If os.makedir is also missing, you might need to replace the attemptLock function too.)</p>
<p>Also, I&#8217;m not sure which 44k of code you&#8217;re talking about, but the TileCache Python files (minus examples, docs, etc.) are only 1200:</p>
<p>disciplina:~/tilecache-1.8.1/TileCache crschmidt$ ls<br />
Cache.py        Client.py       Layer.py        Service.py      __init__.py<br />
disciplina:~/tilecache-1.8.1/TileCache crschmidt$ wc -l *<br />
     154 Cache.py<br />
     115 Client.py<br />
     418 Layer.py<br />
     526 Service.py<br />
       5 __init__.py<br />
    1218 total</p>
<p>So it&#8217;s even worse than you suspected <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Out of curiosity, where is _hashlib getting imported from? Is it something we can drop out of TileCache in the main branch? I&#8217;d like to TC and make it work on IronPython out of the box if possible, rather than having a forked project &#8212; if there&#8217;s ways we can test for IronPython and change some of our behavior, I&#8217;d love to see them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fuzzyman</title>
		<link>http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-64</link>
		<dc:creator>Fuzzyman</dc:creator>
		<pubDate>Tue, 19 Jun 2007 11:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://mapwrecker.wordpress.com/2007/06/19/python-vs-ironpython-round-2/#comment-64</guid>
		<description>&#039;os.access&#039; is documented here:

http://docs.python.org/lib/os-file-dir.html

Interesting exploration by the way.

Fuzzyman</description>
		<content:encoded><![CDATA[<p>&#8216;os.access&#8217; is documented here:</p>
<p><a href="http://docs.python.org/lib/os-file-dir.html" rel="nofollow">http://docs.python.org/lib/os-file-dir.html</a></p>
<p>Interesting exploration by the way.</p>
<p>Fuzzyman</p>
]]></content:encoded>
	</item>
</channel>
</rss>
