OS Module (how to check free space)

Cameron Laird claird at starbase.neosoft.com
Thu Jan 18 09:08:34 EST 2001


In article <mailman.979825332.27938.python-list at python.org>,
Chris Watson  <chris at voodooland.net> wrote:
>> Hi - newbie question: I've looked over the OS module documentation and I can't find a
>> tool within python that will allow me to check how much free space is available on a
>> storage device such as a hard drive.
>> 
>> Does anyone know how to do this?
>
>Kris,
>
>	AFAIK I would use os.spawnv() to call df to get free space
>assuming this is on unix. Otherwise call whatever win32 equiv there is.
>If you need help with spawnv mail me and ill send you sample code.
			.
			.
			.
I need to write up my notes on this.  In the
meantime, look for "Disk free capacity" in
<URL: http://mini.net/cgi-bin/wikit/526.html >
for platform-specific tips.
-- 

Cameron Laird <claird at NeoSoft.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list