Re: Disk Space Script

2007-11-24 Thread MonkeeSage
On Nov 24, 11:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I would like to write a script in Python to email me when disk space > gets below a certain value. OK, I'll give you the easy way using your example and popen, and then a more complex example that doesn't rely on df/grep/awk an

Re: Disk Space Script

2007-11-24 Thread Erik Max Francis
[EMAIL PROTECTED] 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 m

Re: Disk Space Script

2007-11-24 Thread kyosohma
On Nov 24, 2:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Nov 24, 2:11 pm, [EMAIL PROTECTED] wrote: > > > > > On Nov 24, 11:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > Hello all, > > > > I would like to write a script in Python to email me when disk space > > > g

Re: Disk Space Script

2007-11-24 Thread [EMAIL PROTECTED]
On Nov 24, 2:11 pm, [EMAIL PROTECTED] wrote: > On Nov 24, 11:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > Hello all, > > > 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 g

Re: Disk Space Script

2007-11-24 Thread kyosohma
On Nov 24, 11:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello all, > > 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?

Disk Space Script

2007-11-24 Thread [EMAIL PROTECTED]
Hello all, 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? import os os.system("df -x cifs -x iso9660 | grep -E ^/dev | awk '{ print $1,$