I don't have a lot of familiarity with Python but I do with Ruby. So I will provide analogues for what I want to achieve
In Ruby I would
val = `adb devices`
to get the "raw output" of adb devices stored in val, and
val=system("adb devices")
to get the status code
I want to perform the same tasks in Python. I looked at
from subprocess import call
call(["adb devices"])
but that failed, I don't want to use os.system cause I want to get some proper error handling. how do i make call work and how do i obtain raw output from backticks in Python