Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. tasks = check_output(['tasklist']).decode('cp866', 'ignore').split("rn")
  2. p = []
  3. for task in tasks:
  4. m = re.match(b'(.*?)\s+(\d+)\s+(\w+)\s+(\w+)\s+(.*?)\s.*', task.encode())
  5. if m is not None:
  6. p.append(m.group(1).decode())
  7. print(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement