I want to make a Python script that transforms a part of VS Code launch.json into a normal command for a terminal. I need it to communicate with non-VSCode users. Here is the example:
import json launch_json = ''' { "name": "temp", "type": "python", "request": "launch", "program": "script.py", "console": "integratedTerminal", "justMyCode": false, "args": ["abcd", "--log", "log.txt"], "env": {"CUDA_VISIBLE_DEVICES":"0"}, } ''' d = json.loads(launch_json) command = d["program"] + " " + " ".join(d["args"]) print(command) If I run it, I have the following error:
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 12 column 9 (char 344) How do I make the script?