```
import os

test = os.system("ls /etc/init.d/ | grep jboss- | grep -vw jboss-")
for row in test:
    print row

```

For some reason this gives the TypeError: iteration over non-sequence error on this. 

When I do a print test without the for loop, it gives a list of the jboss instances, plus a "0" at the bottom.. The heck?