<?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: Getting free diskspace in python</title>
	<atom:link href="http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/feed/" rel="self" type="application/rss+xml" />
	<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/</link>
	<description>programming, photography, media, and anything else that strikes my fancy</description>
	<lastBuildDate>Wed, 30 Jun 2010 13:38:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: fitorec</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-68189</link>
		<dc:creator>fitorec</dc:creator>
		<pubDate>Mon, 21 Jun 2010 01:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-68189</guid>
		<description>tanks!!.

I thought solution the problem with a system call with the df command in linux with the command df, &#039;;¬( but your solution is more elegant, does it work for all operating systems?(I mention this for what it says Dan Aquinas).
I think that the function will return the space in mega bytes would be:

import os
def freespace(p):
    &quot;&quot;&quot;
    Returns the number of free MegaBytes on the drive that ``p`` is on
    &quot;&quot;&quot;
    s = os.statvfs(p)
    return (s.f_bsize * s.f_bavail)/(1024*1024)</description>
		<content:encoded><![CDATA[<p>tanks!!.</p>
<p>I thought solution the problem with a system call with the df command in linux with the command df, &#8216;;¬( but your solution is more elegant, does it work for all operating systems?(I mention this for what it says Dan Aquinas).<br />
I think that the function will return the space in mega bytes would be:</p>
<p>import os<br />
def freespace(p):<br />
    &#8220;&#8221;"<br />
    Returns the number of free MegaBytes on the drive that &#8220;p&#8220; is on<br />
    &#8220;&#8221;"<br />
    s = os.statvfs(p)<br />
    return (s.f_bsize * s.f_bavail)/(1024*1024)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Aquinas</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-58714</link>
		<dc:creator>Dan Aquinas</dc:creator>
		<pubDate>Fri, 11 Sep 2009 19:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-58714</guid>
		<description>Be warned that &#039;statvfs&#039; is only available on UNIX.  
Trying this code with Python 2.5 on Windows XP + SP3 yields following error:

        AttributeError: &#039;module&#039; object has no attribute &#039;statvfs&#039;</description>
		<content:encoded><![CDATA[<p>Be warned that &#8217;statvfs&#8217; is only available on UNIX.<br />
Trying this code with Python 2.5 on Windows XP + SP3 yields following error:</p>
<p>        AttributeError: &#8216;module&#8217; object has no attribute &#8217;statvfs&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Ford</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-58629</link>
		<dc:creator>John Ford</dc:creator>
		<pubDate>Tue, 08 Sep 2009 22:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-58629</guid>
		<description>Perfect, I am going to use this to fix purge_builds.py from mozilla bug 512199</description>
		<content:encoded><![CDATA[<p>Perfect, I am going to use this to fix purge_builds.py from mozilla bug 512199</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JT</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-57896</link>
		<dc:creator>JT</dc:creator>
		<pubDate>Mon, 24 Aug 2009 20:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-57896</guid>
		<description>Thanks a fourth time, your google ranking is high ;)</description>
		<content:encoded><![CDATA[<p>Thanks a fourth time, your google ranking is high <img src='http://atlee.ca/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sébastien Grenier</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-53839</link>
		<dc:creator>Sébastien Grenier</dc:creator>
		<pubDate>Wed, 24 Jun 2009 23:40:40 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-53839</guid>
		<description>Thanks a lot! I&#039;m new to python and I&#039;m not a programmer, this piece of code save me time and it&#039;s only 4 lines!

Thank again!</description>
		<content:encoded><![CDATA[<p>Thanks a lot! I&#8217;m new to python and I&#8217;m not a programmer, this piece of code save me time and it&#8217;s only 4 lines!</p>
<p>Thank again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Huckins</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-51052</link>
		<dc:creator>Samuel Huckins</dc:creator>
		<pubDate>Thu, 09 Apr 2009 20:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-51052</guid>
		<description>This was just what I was looking for. Thanks!</description>
		<content:encoded><![CDATA[<p>This was just what I was looking for. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Wentworth</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-50150</link>
		<dc:creator>Dan Wentworth</dc:creator>
		<pubDate>Mon, 16 Mar 2009 09:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-50150</guid>
		<description>Hey, thanks for this, I&#039;d been using BFREE, and couldn&#039;t figure out why I was getting inaccurate readings.</description>
		<content:encoded><![CDATA[<p>Hey, thanks for this, I&#8217;d been using BFREE, and couldn&#8217;t figure out why I was getting inaccurate readings.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
