看一下2330.txt的結構
targetJson = r”C:\Python\Json\2330.txt”
需要寫一個settings.json的檔案
![Python如何讀取json檔?codebeautify.org 線上瀏覽json檔, with open(targetJson,"r") as f: json_str = f.read() ; jsn = json.loads(json_str) - 儲蓄保險王](https://savingking.com.tw/wp-content/uploads/2022/09/20220928112857_100.png)
settings.json:
{‘python.defaultInterpreterPath’: ‘D:\\myInstallation\\Python310\\python.exe’, ‘files.encoding’: ‘utf8’, ‘terminal.integrated.profiles.windows’: {‘Command Prompts’: {‘path’: [‘${env:windir}\\System32\\cmd.exe’], ‘args’: [], ‘icon’: ‘terminal-cmd’}}, ‘terminal.integrated.defaultProfile.windows’: ‘Command Prompts’, ‘editor.autoIndent’: ‘advanced’}
近期留言