Re: calculate system disk space

2005-12-10 Thread Neil Hodgson
Heiko Wundram: > Under Windows you don't have sparse files though, so there > are no fields ... Does too! http://msdn.microsoft.com/library/en-us/fileio/fs/fsctl_set_sparse.asp They're fairly rare though. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: calculate system disk space

2005-12-10 Thread Heiko Wundram
[EMAIL PROTECTED] wrote: > A little somehting I rigged up when I found the Python call to be Linux > specific: os.stat isn't Linux-specific, isn't even Unix-specific, works just fine under Windows. Under Windows you don't have sparse files though, so there are no fields which give you the block-si

Re: calculate system disk space

2005-12-10 Thread [EMAIL PROTECTED]
A little somehting I rigged up when I found the Python call to be Linux specific: """ mount_list Taste the system and return a list of mount points. On UNIX this will return what a df will return On DOS based systems run through a list of common drive letters and test them to see if a mount point

Re: calculate system disk space

2005-12-09 Thread Heiko Wundram
PyPK wrote: > I am looking for unix.the recipe is windows specific!! Parse the output of du/df? :-) I guess that would be simplest... ;-) Otherwise, use some combination of os.walk() and os.stat(), whereby you _don't_ use the stat.st_size field to get the file size (on disk) but rather use stat.s

Re: calculate system disk space

2005-12-09 Thread PyPK
I am looking for unix.the recipe is windows specific!! -- http://mail.python.org/mailman/listinfo/python-list

Re: calculate system disk space

2005-12-09 Thread jmdeschamps
PyPK wrote: > how can we compute the current system disk space using a python > script.? > any ideas or have anyone tried this.. Google, on "Python disk size", returned this link: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66455 Thanks for the reply recipe, Steve ;-) Jean-Marc --

calculate system disk space

2005-12-09 Thread PyPK
how can we compute the current system disk space using a python script.? any ideas or have anyone tried this.. -- http://mail.python.org/mailman/listinfo/python-list