473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
|
+
+
|
if nResult == 1:
# lFile = xFilePicker.getSelectedFiles()
lFile = xFilePicker.getFiles()
spfExported = lFile[0][5:].lstrip("/") # remove file://
if platform.system() != "Windows":
spfExported = "/" + spfExported
spfExported = urllib.parse.unquote(spfExported)
if not spfExported.endswith((".json", ".JSON")):
spfExported += ".json"
#spfExported = os.path.join(os.path.expanduser("~"), "fr.personal.json")
sJSON = self.xOptionNode.getPropertyValue("personal_dic")
if sJSON:
with open(spfExported, "w", encoding="utf-8") as hDst:
hDst.write(sJSON)
sMessage = ui.get('export_message') % spfExported
else:
|