Disk Space Script

Erik Max Francis max at alcyone.com
Sat Nov 24 18:09:08 EST 2007


mostro713 at gmail.com wrote:

> I would like to write a script in Python to email me when disk space
> gets below a certain value.
> 
> My first question (I'm sure of many) is how do get this output into a
> dictionary or list to index the values?

Read it in line by line with os.popen, or one of the more involved 
popen... modules, and then parse it however you like.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
   Who'd ever think it / Such a squalid little ending
    -- The American and Florence, _Chess_



More information about the Python-list mailing list