Added new attribute to parsed_output. #18

Closed
wants to merge 6 commits into
from

Projects

None yet

2 participants

@kracekumar
Contributor

Added parsed_output in Response method, r.std_out gives entire output in string. This works fine for one line output, but commands like ps, netstat will yield many lines. In those cases users need to split('\n') and store it in a list and process the output. This is cumbersome. So parsed output will split the lines and results are further split and each column of the ouput can be accessed like a list. Eg. r.parsed_output[0][0] => will yield first column in the output."

kracekumar added some commits Jan 21, 2012
@kracekumar kracekumar Added parsed_output in Response method, r.std_out gives entire output…
… in string. This works fine for one line output, but commands like ps, netstat will yield many lines. In those cases users need to split('\n') and store it in a list and process the output. This is cumbersome. So parsed output will split the lines and results are further split and each column of the ouput can be accessed like a list. Eg. r.parsed_output[0][0] => will yield first column in the output.
11fa2fe
@kracekumar kracekumar made sure parsed_out is always list 25740bd
@kracekumar kracekumar made a cosmetic change for list cf878e2
@kennethreitz
Owner

I'm torn on this. Looks pretty neat, but unnecessary.

@kracekumar
Contributor

Fine.

@kracekumar kracekumar closed this Jan 29, 2012
@kennethreitz
Owner

Why did you close the issue?

@kracekumar kracekumar reopened this Jan 29, 2012
@kracekumar
Contributor

Thought you are not interested :)

@kennethreitz
Owner

I like the idea, but I'm torn. Perhaps we could make it available as a utility function.

@kracekumar
Contributor

That should be fine, but at this point in envoy we don't any other utility function right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment