0
は、私は、JSONの設定ファイルを書きました。PythonのJSON設定ファイル
{"file": {"file_name": "file.xls"},"names1":{"Joe Allen": "JOE","Leo Messi": "MESSI"}}
私は整形を保つために何をすべき:JSONファイルの変更のテキストがどのように見えるの後
def plik(self, evt):
wildcard = "MS excell (*.xls)|*.xls"
dialog = wx.FileDialog(self, "Choose a file", os.getcwd(), "", wildcard, wx.OPEN)
if dialog.ShowModal() == wx.ID_OK:
config['file'] = {'file_name': dialog.GetFilename()}
with open('config.json', 'w') as f:
json.dump(config, f)
self.Destroy()
frame = Program()
frame.Show()
:私はFILE_NAMEを変更する機能を使用しています。