<?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 for g-Off.net | Geoffrey Foster</title>
	<atom:link href="http://g-Off.net/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://g-Off.net</link>
	<description></description>
	<lastBuildDate>Sat, 06 Feb 2010 23:10:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on A Python repeatable threading.Timer class by gfoster</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-2305</link>
		<dc:creator>gfoster</dc:creator>
		<pubDate>Sat, 06 Feb 2010 23:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-2305</guid>
		<description>Based upon the error and the snippet of code (without seeing more of it) I&#039;d have to guess that sinceIDReply is a module and not a function or object (the object must implement the __call__ method for it to be callable)</description>
		<content:encoded><![CDATA[<p>Based upon the error and the snippet of code (without seeing more of it) I&#8217;d have to guess that sinceIDReply is a module and not a function or object (the object must implement the __call__ method for it to be callable)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by gfoster</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-2304</link>
		<dc:creator>gfoster</dc:creator>
		<pubDate>Sat, 06 Feb 2010 23:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-2304</guid>
		<description>No, like all python threads once it has been stopped it is no longer valid and can&#039;t be restarted. You could of course add something into the run method that would check a &quot;paused&quot; boolean value, which, if true, could then cause the thread to sleep for a certain period of time</description>
		<content:encoded><![CDATA[<p>No, like all python threads once it has been stopped it is no longer valid and can&#8217;t be restarted. You could of course add something into the run method that would check a &#8220;paused&#8221; boolean value, which, if true, could then cause the thread to sleep for a certain period of time</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by Yeison</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-2303</link>
		<dc:creator>Yeison</dc:creator>
		<pubDate>Sat, 06 Feb 2010 19:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-2303</guid>
		<description>I keep getting this error:
 
Traceback (most recent call last):
  File &quot;MentionPoll.py&quot;, line 51, in 
    initTwitterPolling()
  File &quot;MentionPoll.py&quot;, line 47, in initTwitterPolling
    r = RepeatTimer(10.0, sinceIDReply, args=since_id)
TypeError: &#039;module&#039; object is not callable


Any ideas what it could be?</description>
		<content:encoded><![CDATA[<p>I keep getting this error:</p>
<p>Traceback (most recent call last):<br />
  File &#8220;MentionPoll.py&#8221;, line 51, in<br />
    initTwitterPolling()<br />
  File &#8220;MentionPoll.py&#8221;, line 47, in initTwitterPolling<br />
    r = RepeatTimer(10.0, sinceIDReply, args=since_id)<br />
TypeError: &#8216;module&#8217; object is not callable</p>
<p>Any ideas what it could be?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by pball</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-2297</link>
		<dc:creator>pball</dc:creator>
		<pubDate>Fri, 05 Feb 2010 15:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-2297</guid>
		<description>This is exactly what I need for my wallpaper script, except I&#039;d like to be able to start and stop it. I saw in your last post you you can use r.cancel() to stop it, but you can&#039;t just restart with r.start() since it gives the error &quot;RuntimeError: thread already started&quot;. 

Is there a simple way to restart the timer after it&#039;s been stopped?</description>
		<content:encoded><![CDATA[<p>This is exactly what I need for my wallpaper script, except I&#8217;d like to be able to start and stop it. I saw in your last post you you can use r.cancel() to stop it, but you can&#8217;t just restart with r.start() since it gives the error &#8220;RuntimeError: thread already started&#8221;. </p>
<p>Is there a simple way to restart the timer after it&#8217;s been stopped?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by mrttlemonde</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-2245</link>
		<dc:creator>mrttlemonde</dc:creator>
		<pubDate>Wed, 27 Jan 2010 21:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-2245</guid>
		<description>I don&#039;t understand why I can&#039;t run your timer... I use it just to display a message every minute. The first time it run fine... but after that, an error occur and I don&#039;t know why.

  File &quot;/usr/lib/python2.6/threading.py&quot;, line 525, in __bootstrap_inner
    self.run()
  File &quot;./radio.py&quot;, line 308, in run
    self.function(*self.args, **self.kwargs)
TypeError: &#039;NoneType&#039; object is not callable

That&#039;s the method : 

	def summaryRefresh (self, message, startIt) :
		self.waiting_seconds = self.waiting_seconds - 60
		endIt = self.textBuffer.get_end_iter()
		self.textBuffer.delete(startIt, endIt)		
		if (self.waiting_seconds &lt; 60) :
			self.textBuffer.insert(startIt, &quot;* Starting in a few moments...\n&quot;)
		else :
			message_displayed = message % (int(self.waiting_seconds / 60))
			self.textBuffer.insert(startIt, message_displayed)

Could you help me please?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand why I can&#8217;t run your timer&#8230; I use it just to display a message every minute. The first time it run fine&#8230; but after that, an error occur and I don&#8217;t know why.</p>
<p>  File &#8220;/usr/lib/python2.6/threading.py&#8221;, line 525, in __bootstrap_inner<br />
    self.run()<br />
  File &#8220;./radio.py&#8221;, line 308, in run<br />
    self.function(*self.args, **self.kwargs)<br />
TypeError: &#8216;NoneType&#8217; object is not callable</p>
<p>That&#8217;s the method : </p>
<p>	def summaryRefresh (self, message, startIt) :<br />
		self.waiting_seconds = self.waiting_seconds &#8211; 60<br />
		endIt = self.textBuffer.get_end_iter()<br />
		self.textBuffer.delete(startIt, endIt)<br />
		if (self.waiting_seconds &lt; 60) :<br />
			self.textBuffer.insert(startIt, &quot;* Starting in a few moments&#8230;\n&quot;)<br />
		else :<br />
			message_displayed = message % (int(self.waiting_seconds / 60))<br />
			self.textBuffer.insert(startIt, message_displayed)</p>
<p>Could you help me please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by gfoster</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-1863</link>
		<dc:creator>gfoster</dc:creator>
		<pubDate>Wed, 11 Nov 2009 01:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-1863</guid>
		<description>You can break from a script using Ctrl+C (sends and EOF). Ctrl+C is for sending a KeyboardInterrupt.

You can also cancel the execution of the timer by entering the command (for the above example script) r.cancel() and then exit normally.

The interaction of KeyboardInterrupt and multi-threaded python is mentioned in the python docs, particularly:
&lt;blockquote&gt;Threads interact strangely with interrupts: the KeyboardInterrupt exception will be received by an arbitrary thread. (When the signal module is available, interrupts always go to the main thread.)&lt;/blockquote&gt;

As mentioned in http://docs.python.org/library/thread.html</description>
		<content:encoded><![CDATA[<p>You can break from a script using Ctrl+C (sends and EOF). Ctrl+C is for sending a KeyboardInterrupt.</p>
<p>You can also cancel the execution of the timer by entering the command (for the above example script) r.cancel() and then exit normally.</p>
<p>The interaction of KeyboardInterrupt and multi-threaded python is mentioned in the python docs, particularly:</p>
<blockquote><p>Threads interact strangely with interrupts: the KeyboardInterrupt exception will be received by an arbitrary thread. (When the signal module is available, interrupts always go to the main thread.)</p></blockquote>
<p>As mentioned in <a href="http://docs.python.org/library/thread.html" rel="nofollow">http://docs.python.org/library/thread.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by Sergey Petrov</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-1852</link>
		<dc:creator>Sergey Petrov</dc:creator>
		<pubDate>Sun, 08 Nov 2009 02:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-1852</guid>
		<description>When I&#039;m running this code on MacOSX10.6 with Python 2.6.1 I can&#039;t break script execution by pressing ctrl+c in terminal. 

Is there any way to make this work?</description>
		<content:encoded><![CDATA[<p>When I&#8217;m running this code on MacOSX10.6 with Python 2.6.1 I can&#8217;t break script execution by pressing ctrl+c in terminal. </p>
<p>Is there any way to make this work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by gfoster</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-1809</link>
		<dc:creator>gfoster</dc:creator>
		<pubDate>Fri, 30 Oct 2009 00:11:56 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-1809</guid>
		<description>I can&#039;t actually remember why I had the two Event objects but it would seem that you&#039;re right at the extra one is unneeded. I&#039;ve updated the code to reflect this. Thanks!</description>
		<content:encoded><![CDATA[<p>I can&#8217;t actually remember why I had the two Event objects but it would seem that you&#8217;re right at the extra one is unneeded. I&#8217;ve updated the code to reflect this. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by Aditya Rajgarhia</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-1800</link>
		<dc:creator>Aditya Rajgarhia</dc:creator>
		<pubDate>Wed, 28 Oct 2009 23:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-1800</guid>
		<description>Hi, thanks for putting this up. I&#039;m wondering why you have used two Event objects, self.event and self.finished. It seems to me that only one should be needed, and I was able to have it work with just one.

But I&#039;m fairly new to Python, and if there is a reason why you used two separate Event objects, could you mention why?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi, thanks for putting this up. I&#8217;m wondering why you have used two Event objects, self.event and self.finished. It seems to me that only one should be needed, and I was able to have it work with just one.</p>
<p>But I&#8217;m fairly new to Python, and if there is a reason why you used two separate Event objects, could you mention why?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Python repeatable threading.Timer class by gfoster</title>
		<link>http://g-Off.net/software/a-python-repeatable-threadingtimer-class/comment-page-1#comment-1285</link>
		<dc:creator>gfoster</dc:creator>
		<pubDate>Tue, 28 Jul 2009 18:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://g-Off.net/?p=11#comment-1285</guid>
		<description>Your function Log_In is taking 1 argument (self), which is unnecessary because it&#039;s a function on its own and not a method (where a method would be a function that is called on an object which is an instance of a class).

Try:
&lt;code&gt;def Log_In():
&#160;&#160;print &quot;Loggin in!&quot;
&lt;/code&gt;

for your function</description>
		<content:encoded><![CDATA[<p>Your function Log_In is taking 1 argument (self), which is unnecessary because it&#8217;s a function on its own and not a method (where a method would be a function that is called on an object which is an instance of a class).</p>
<p>Try:<br />
<code>def Log_In():<br />
&nbsp;&nbsp;print "Loggin in!"<br />
</code></p>
<p>for your function</p>
]]></content:encoded>
	</item>
</channel>
</rss>
