Last active
April 21, 2020 19:25
-
-
Save jerome-diver/611b48ad5f05336605a0b3d8e51179ec to your computer and use it in GitHub Desktop.
trying to get json object from command returning json through subprocess call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import subprocess | |
# you need to have taskwarrior application installed on the Linux system to rich the shell command to return a json data | |
j = json.loads(subprocess.run(["task", "status:pending", "export"], capture_output=True, check=True).stdout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you @graingert from freenode IRC server channel #python to help me to find the solution...