I want to use the command:
subprocess.check_output(["powercfg", "-list"])
which gives me:
Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (Balanced)
Power Scheme GUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (High performance)
Power Scheme GUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (Power saver) *
which is good. But, I only want the variables in the middle to go into their own variables without all the extra text. The problem is that the command comes out in multiple lines so I can't use (list[19:55])
. I also need to do this with each of the strings inside the parentheses into their own variables but I think I can figure that out. I'm new to Python so I'm open to whatever.