<?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>Fri, 27 Jan 2012 19:08:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Grieve</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-86043</link>
		<dc:creator>Grieve</dc:creator>
		<pubDate>Tue, 28 Jun 2011 13:35:53 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-86043</guid>
		<description>@jaja

Only the most used operating system ON PERSONAL COMPUTERS

(I can use caps too :D)

The most common operating system in the world is by far and away linux, when considering the millions of web servers and app servers. That&#039;s ignoring the millions of unix based mobile devices.


Thanks btw, exactly what I was looking for!</description>
		<content:encoded><![CDATA[<p>@jaja</p>
<p>Only the most used operating system ON PERSONAL COMPUTERS</p>
<p>(I can use caps too <img src='http://atlee.ca/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>The most common operating system in the world is by far and away linux, when considering the millions of web servers and app servers. That&#8217;s ignoring the millions of unix based mobile devices.</p>
<p>Thanks btw, exactly what I was looking for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-86042</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 28 Jun 2011 12:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-86042</guid>
		<description>@jaja, there is a solution actually: http://stackoverflow.com/questions/51658/cross-platform-space-remaining-on-volume-using-python
The operating system you mention is not made to program on, though. It is a console game platform.</description>
		<content:encoded><![CDATA[<p>@jaja, there is a solution actually: <a href="http://stackoverflow.com/questions/51658/cross-platform-space-remaining-on-volume-using-python" rel="nofollow">http://stackoverflow.com/questions/51658/cross-platform-space-remaining-on-volume-using-python</a><br />
The operating system you mention is not made to program on, though. It is a console game platform.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaja</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-82850</link>
		<dc:creator>jaja</dc:creator>
		<pubDate>Tue, 19 Apr 2011 17:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-82850</guid>
		<description>If you are attempting to do this in THE MOST USED OPERATING SYSTEM IN THE WORLD...

You are out of luck.  This doesn&#039;t work and no one knows what the alternative is.</description>
		<content:encoded><![CDATA[<p>If you are attempting to do this in THE MOST USED OPERATING SYSTEM IN THE WORLD&#8230;</p>
<p>You are out of luck.  This doesn&#8217;t work and no one knows what the alternative is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/comment-page-1/#comment-70914</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Wed, 04 Aug 2010 10:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://atlee.ca/blog/2008/02/23/getting-free-diskspace-in-python/#comment-70914</guid>
		<description>Thank you! :)</description>
		<content:encoded><![CDATA[<p>Thank you! <img src='http://atlee.ca/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<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 &#8216;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 &#8216;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>
</channel>
</rss>

