ask kitten: Output JSON when used standalone

This commit is contained in:
Kovid Goyal 2023-01-22 11:48:51 +05:30
parent 0a1b399447
commit 5b4e4f032d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -527,4 +527,5 @@ def handle_result(args: List[str], data: Response, target_window_id: int, boss:
if __name__ == '__main__':
ans = main(sys.argv)
if ans:
print(ans)
import json
print(json.dumps(ans))