<?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/"
		>
<channel>
	<title>Comments on: A Better Python Reload</title>
	<atom:link href="http://www.codexon.com/posts/a-better-python-reload/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codexon.com/posts/a-better-python-reload</link>
	<description></description>
	<lastBuildDate>Sun, 05 Sep 2010 05:11:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: John</title>
		<link>http://www.codexon.com/posts/a-better-python-reload/comment-page-1#comment-595</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 26 Apr 2010 11:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.codexon.com/?p=6#comment-595</guid>
		<description>Coming from Lisp, Python looks more and more like a joke prod
and less like a serious general purpose DYNAMIC language. The fact that i can not selectively update the code i want without losing state and without resorting to reload tricks that seem to copy the worst of Erlang is a big hindrance.

Erlang may have code update but it is only one step above Python&#039;s.
For the ultimate in live-coding and productivity boost check out Common Lisp or Smalltalk. This is what all dynamic languages should strive for.</description>
		<content:encoded><![CDATA[<p>Coming from Lisp, Python looks more and more like a joke prod<br />
and less like a serious general purpose DYNAMIC language. The fact that i can not selectively update the code i want without losing state and without resorting to reload tricks that seem to copy the worst of Erlang is a big hindrance.</p>
<p>Erlang may have code update but it is only one step above Python&#8217;s.<br />
For the ultimate in live-coding and productivity boost check out Common Lisp or Smalltalk. This is what all dynamic languages should strive for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codexon.com/posts/a-better-python-reload/comment-page-1#comment-547</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 14 Feb 2010 21:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.codexon.com/?p=6#comment-547</guid>
		<description>Thanks for the improvements. Reload is full of complications and corner cases especially in a dynamic language like Python. I think it is impossible to make it fool-proof.</description>
		<content:encoded><![CDATA[<p>Thanks for the improvements. Reload is full of complications and corner cases especially in a dynamic language like Python. I think it is impossible to make it fool-proof.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gatorade</title>
		<link>http://www.codexon.com/posts/a-better-python-reload/comment-page-1#comment-544</link>
		<dc:creator>gatorade</dc:creator>
		<pubDate>Thu, 11 Feb 2010 07:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.codexon.com/?p=6#comment-544</guid>
		<description>correction to the pastebin above, forgot this line in the update loop:

mod.__dict__[key] = old_obj</description>
		<content:encoded><![CDATA[<p>correction to the pastebin above, forgot this line in the update loop:</p>
<p>mod.__dict__[key] = old_obj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gatorade</title>
		<link>http://www.codexon.com/posts/a-better-python-reload/comment-page-1#comment-543</link>
		<dc:creator>gatorade</dc:creator>
		<pubDate>Wed, 10 Feb 2010 21:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.codexon.com/?p=6#comment-543</guid>
		<description>There is at least one problem with this reload:

I have a module that imports the &quot;parse_qsl&quot; function from urlparse. When I try your reload on this module, parse_qsl loses its default parameters and complains that I&#039;m not calling it properly.


Take a look at the superreload function here:

http://www.cherrypy.org/attachment/wiki/AutoReload/autoreload.py

It&#039;s very slow and wasteful with memory, but it seems to be more reliable. I haven&#039;t had any such problems with it.


I&#039;m now using this combination of both methods:

http://pastebin.com/f14287ce5

This seems to solve everything pretty well. Am I missing anything? Could it be optimized any more?</description>
		<content:encoded><![CDATA[<p>There is at least one problem with this reload:</p>
<p>I have a module that imports the &#8220;parse_qsl&#8221; function from urlparse. When I try your reload on this module, parse_qsl loses its default parameters and complains that I&#8217;m not calling it properly.</p>
<p>Take a look at the superreload function here:</p>
<p><a  href="http://www.cherrypy.org/attachment/wiki/AutoReload/autoreload.py" rel="nofollow">http://www.cherrypy.org/attachment/wiki/AutoReload/autoreload.py</a></p>
<p>It&#8217;s very slow and wasteful with memory, but it seems to be more reliable. I haven&#8217;t had any such problems with it.</p>
<p>I&#8217;m now using this combination of both methods:</p>
<p><a  href="http://pastebin.com/f14287ce5" rel="nofollow">http://pastebin.com/f14287ce5</a></p>
<p>This seems to solve everything pretty well. Am I missing anything? Could it be optimized any more?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuri Baburov</title>
		<link>http://www.codexon.com/posts/a-better-python-reload/comment-page-1#comment-513</link>
		<dc:creator>Yuri Baburov</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.codexon.com/?p=6#comment-513</guid>
		<description>As for your reload(), you might try to use gc.get_objects to find all instances belonging to mod (.__module__ key), and update them to new module.</description>
		<content:encoded><![CDATA[<p>As for your reload(), you might try to use gc.get_objects to find all instances belonging to mod (.__module__ key), and update them to new module.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuri Baburov</title>
		<link>http://www.codexon.com/posts/a-better-python-reload/comment-page-1#comment-512</link>
		<dc:creator>Yuri Baburov</dc:creator>
		<pubDate>Mon, 18 Jan 2010 09:58:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codexon.com/?p=6#comment-512</guid>
		<description>Please change the last 3 lines of code to

    class a:
        def make(self):
            class b: pass
            return b

since your variant throws &quot;SyntaxError: invalid syntax&quot; (at least in Python 2.5).</description>
		<content:encoded><![CDATA[<p>Please change the last 3 lines of code to</p>
<p>    class a:<br />
        def make(self):<br />
            class b: pass<br />
            return b</p>
<p>since your variant throws &#8220;SyntaxError: invalid syntax&#8221; (at least in Python 2.5).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
