Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tasks = check_output(['tasklist']).decode('cp866', 'ignore').split("rn")
- p = []
- for task in tasks:
- m = re.match(b'(.*?)\s+(\d+)\s+(\w+)\s+(\w+)\s+(.*?)\s.*', task.encode())
- if m is not None:
- p.append(m.group(1).decode())
- print(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement