Re: [Tutor] df type function in python

2009-01-07 Thread Roel Schroeven
Spencer Parker schreef: > I am looking for a function in python that would operate similar to df. > I would use df, but I am unable to parse the data that it gives me from > there. If it would give me a single line I could then split it out if I > needed to, but I can't see how to actually do tha

Re: [Tutor] df type function in python

2009-01-07 Thread Stuart Sears
On 07/01/09 18:08, Spencer Parker wrote: Is there anyway to get rid of the header information? I just want the output that it gives me for the device. parse the output and junk the first line? I'm no subprocess expert, but a bit of playing about suggests this would work: from subprocess impo

Re: [Tutor] df type function in python

2009-01-07 Thread Stuart Sears
Redirecting to the list as I seem to have replied off-list rather inadvertently... headers...> On 07/01/09 16:42, Spencer Parker wrote: I am looking for a function in python that would operate similar to df. I would use df, but I am unable to parse the data that it gives me from there. If it

Re: [Tutor] df type function in python

2009-01-07 Thread Spencer Parker
What I did was just grep for anything starting with "/" It then just outputs it to a single line now...and I can split it as needed. Thanks again!!1 On Wed, Jan 7, 2009 at 11:33 AM, Kent Johnson wrote: > On Wed, Jan 7, 2009 at 1:08 PM, Spencer Parker > wrote: > > Is there anyway to get rid of

Re: [Tutor] df type function in python

2009-01-07 Thread Kent Johnson
On Wed, Jan 7, 2009 at 1:08 PM, Spencer Parker wrote: > Is there anyway to get rid of the header information? I just want the > output that it gives me for the device. If you know how to get the output of df into Python (e.g. with the subprocess module or a pipe) then you can use the str.splitli

Re: [Tutor] df type function in python

2009-01-07 Thread Spencer Parker
Is there anyway to get rid of the header information? I just want the output that it gives me for the device. On Wed, Jan 7, 2009 at 11:02 AM, Stuart Sears wrote: > On 07/01/09 16:42, Spencer Parker wrote: > >> I am looking for a function in python that would operate similar to df. >> I would

[Tutor] df type function in python

2009-01-07 Thread Spencer Parker
I am looking for a function in python that would operate similar to df. I would use df, but I am unable to parse the data that it gives me from there. If it would give me a single line I could then split it out if I needed to, but I can't see how to actually do that. What I am trying to do is ge