<?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 mind the explanatory gap</title>
	<atom:link href="http://explanatorygap.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://explanatorygap.net</link>
	<description>many a slip 'twixt mind and lip...</description>
	<lastBuildDate>Mon, 10 May 2010 22:46:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>Comment on python subprocess over shell by Links for 2010-05-10</title>
		<link>http://explanatorygap.net/2010/05/10/python-subprocess-over-shell/comment-page-1/#comment-2283</link>
		<dc:creator>Links for 2010-05-10</dc:creator>
		<pubDate>Mon, 10 May 2010 22:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=256#comment-2283</guid>
		<description>[...] 07:26: python subprocess instead of shell http://explanatorygap.net/2010/05/10/python-subprocess-over-shell/ [...]</description>
		<content:encoded><![CDATA[<p>[...] 07:26: python subprocess instead of shell <a href="http://explanatorygap.net/2010/05/10/python-subprocess-over-shell/" rel="nofollow">http://explanatorygap.net/2010/05/10/python-subprocess-over-shell/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on python subprocess over shell by nigel kersten</title>
		<link>http://explanatorygap.net/2010/05/10/python-subprocess-over-shell/comment-page-1/#comment-2282</link>
		<dc:creator>nigel kersten</dc:creator>
		<pubDate>Mon, 10 May 2010 18:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=256#comment-2282</guid>
		<description>Yep. A custom function I often use is one that returns a tuple of (stdout, stderr, returncode) so you can use it however you want.

I don&#039;t use it often, mainly because I still do python 2.4 work, but the convenience function check_call that appeared in 2.5 is quite useful too:

http://docs.python.org/library/subprocess.html#convenience-functions

&lt;blockquote&gt;
subprocess.check_call(*popenargs, **kwargs)
Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute.

The arguments are the same as for the Popen constructor. Example:

&gt;&gt;&gt; subprocess.check_call([&quot;ls&quot;, &quot;-l&quot;])
0
New in version 2.5.
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>Yep. A custom function I often use is one that returns a tuple of (stdout, stderr, returncode) so you can use it however you want.</p>
<p>I don&#8217;t use it often, mainly because I still do python 2.4 work, but the convenience function check_call that appeared in 2.5 is quite useful too:</p>
<p><a href="http://docs.python.org/library/subprocess.html#convenience-functions" rel="nofollow">http://docs.python.org/library/subprocess.html#convenience-functions</a></p>
<blockquote><p>
subprocess.check_call(*popenargs, **kwargs)<br />
Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute.</p>
<p>The arguments are the same as for the Popen constructor. Example:</p>
<p>>>> subprocess.check_call(["ls", "-l"])<br />
0<br />
New in version 2.5.
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on python subprocess over shell by Preston</title>
		<link>http://explanatorygap.net/2010/05/10/python-subprocess-over-shell/comment-page-1/#comment-2281</link>
		<dc:creator>Preston</dc:creator>
		<pubDate>Mon, 10 May 2010 18:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=256#comment-2281</guid>
		<description>for blind calls to commands (no communication needed), I actually have this snippet built into my TextMate boilerplate for Python sysadmin scripts:

from subprocess import Popen, call, STDOUT, PIPE

def sh(cmd):
    return Popen(cmd,shell=True,stdout=PIPE,stderr=PIPE).communicate()[0]

so calling a shell command is as easy as:

printer_xml = sh(&#039;system_profiler -xml SPPrintersDataType&#039;)</description>
		<content:encoded><![CDATA[<p>for blind calls to commands (no communication needed), I actually have this snippet built into my TextMate boilerplate for Python sysadmin scripts:</p>
<p>from subprocess import Popen, call, STDOUT, PIPE</p>
<p>def sh(cmd):<br />
    return Popen(cmd,shell=True,stdout=PIPE,stderr=PIPE).communicate()[0]</p>
<p>so calling a shell command is as easy as:</p>
<p>printer_xml = sh(&#8216;system_profiler -xml SPPrintersDataType&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The complexity debt by python subprocess over shell &#171; mind the explanatory gap</title>
		<link>http://explanatorygap.net/2009/10/02/the-complexity-debt/comment-page-1/#comment-2271</link>
		<dc:creator>python subprocess over shell &#171; mind the explanatory gap</dc:creator>
		<pubDate>Mon, 10 May 2010 04:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=210#comment-2271</guid>
		<description>[...] basic up fastest in shell, yes, but at some point you&#8217;re going to have to repay that technical debt if you need to get past a certain [...]</description>
		<content:encoded><![CDATA[<p>[...] basic up fastest in shell, yes, but at some point you&#8217;re going to have to repay that technical debt if you need to get past a certain [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on E-3 Visa Experience&#8230; by Michelle Kelly</title>
		<link>http://explanatorygap.net/2007/03/22/e-3-visa-experience/comment-page-1/#comment-2261</link>
		<dc:creator>Michelle Kelly</dc:creator>
		<pubDate>Tue, 04 May 2010 13:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/2007/03/22/e-3-visa-experience/#comment-2261</guid>
		<description>Hi - is it possible to enrol in study in the US while here on an E3 visa?

I want to enrol in a course that is part time, full fee paying and specific to the profession my E3 is based on.

Any advice is much appreciated!</description>
		<content:encoded><![CDATA[<p>Hi &#8211; is it possible to enrol in study in the US while here on an E3 visa?</p>
<p>I want to enrol in a course that is part time, full fee paying and specific to the profession my E3 is based on.</p>
<p>Any advice is much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seeking input for possible Mac IT Conference by Coté&#39;s People Over Process &#187; Links for April 30th through May 2nd</title>
		<link>http://explanatorygap.net/2010/05/02/seeking-input-for-possible-mac-it-conference/comment-page-1/#comment-2254</link>
		<dc:creator>Coté&#39;s People Over Process &#187; Links for April 30th through May 2nd</dc:creator>
		<pubDate>Sun, 02 May 2010 13:35:41 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=254#comment-2254</guid>
		<description>[...] Seeking input for possible Mac IT Conference [...]</description>
		<content:encoded><![CDATA[<p>[...] Seeking input for possible Mac IT Conference [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Moving the hibernate image file on a MacBookPro&#8230; by Cloyce</title>
		<link>http://explanatorygap.net/2006/06/08/moving-the-hibernate-image-file-on-a-macbookpro/comment-page-1/#comment-2248</link>
		<dc:creator>Cloyce</dc:creator>
		<pubDate>Thu, 08 Apr 2010 17:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/2006/06/08/moving-the-hibernate-image-file-on-a-macbookpro/#comment-2248</guid>
		<description>I had success moving the sleepimage file to a &quot;non-root&quot; volume.  I think the man page is worded misleadingly... You probably can&#039;t move it to a volume that&#039;s not on the same disk as the root.

I moved mine to /Volumes/Swap (a partition on my laptop&#039;s internal disk) and had no problems going to sleep or waking up.  I made sure it used the hibernation file by removing power and battery after I put it to sleep.

This is on a mid-2008 MBP.</description>
		<content:encoded><![CDATA[<p>I had success moving the sleepimage file to a &#8220;non-root&#8221; volume.  I think the man page is worded misleadingly&#8230; You probably can&#8217;t move it to a volume that&#8217;s not on the same disk as the root.</p>
<p>I moved mine to /Volumes/Swap (a partition on my laptop&#8217;s internal disk) and had no problems going to sleep or waking up.  I made sure it used the hibernation file by removing power and battery after I put it to sleep.</p>
<p>This is on a mid-2008 MBP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Profiling puppetmasterd with ruby-prof by nigel kersten</title>
		<link>http://explanatorygap.net/2010/03/11/profiling-puppetmasterd-with-ruby-prof/comment-page-1/#comment-2235</link>
		<dc:creator>nigel kersten</dc:creator>
		<pubDate>Wed, 10 Mar 2010 22:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=245#comment-2235</guid>
		<description>Whoa. That&#039;s a much more useful format to analyze in. Thanks Brice!</description>
		<content:encoded><![CDATA[<p>Whoa. That&#8217;s a much more useful format to analyze in. Thanks Brice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Profiling puppetmasterd with ruby-prof by Brice Figureau</title>
		<link>http://explanatorygap.net/2010/03/11/profiling-puppetmasterd-with-ruby-prof/comment-page-1/#comment-2234</link>
		<dc:creator>Brice Figureau</dc:creator>
		<pubDate>Wed, 10 Mar 2010 19:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/?p=245#comment-2234</guid>
		<description>You should try to generate the profile output with the CallTree printer and use KCachegrind to have a better idea of what happens behind the hood.

Another idea is to profile only below webrick (ie in the puppet http handler) to profile only the code on which we can do something.

And finally, it would be interesting to run the master with JRuby to see if that&#039;s actually better or not. Something I want to do since a long time but never really had the incentive to do.</description>
		<content:encoded><![CDATA[<p>You should try to generate the profile output with the CallTree printer and use KCachegrind to have a better idea of what happens behind the hood.</p>
<p>Another idea is to profile only below webrick (ie in the puppet http handler) to profile only the code on which we can do something.</p>
<p>And finally, it would be interesting to run the master with JRuby to see if that&#8217;s actually better or not. Something I want to do since a long time but never really had the incentive to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simple &#8220;Create Mobile User&#8221; utility. by John Morrissey</title>
		<link>http://explanatorygap.net/2007/03/02/simple-create-mobile-user-utility/comment-page-1/#comment-2142</link>
		<dc:creator>John Morrissey</dc:creator>
		<pubDate>Thu, 10 Dec 2009 20:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://explanatorygap.net/2007/03/02/simple-create-mobile-user-utility/#comment-2142</guid>
		<description>I thought I was smart after answering the product question. 

I need help migrating people off the Macintosh network home directory structure back to the local Macintosh. Any procedures anywhere? Thanks</description>
		<content:encoded><![CDATA[<p>I thought I was smart after answering the product question. </p>
<p>I need help migrating people off the Macintosh network home directory structure back to the local Macintosh. Any procedures anywhere? Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.229 seconds -->

