Do you mean the error code of ls here? "output" is the return code, which should be 0 here but if there were an error that's where it'd end up. Could you describe what you're trying to do in more details?
Also, in the future, even if it's just 3 lines, please put all code in code tags.
Join the #python-forum IRC channel on irc.freenode.net!