eric6/Project/DebuggerPropertiesFile.py

branch
jsonfiles
changeset 8012
ecf45f723038
parent 8006
c4110b8b5931
child 8015
09b24828d787
equal deleted inserted replaced
8011:630a173cb137 8012:ecf45f723038
7 Module implementing a class representing the project debugger properties 7 Module implementing a class representing the project debugger properties
8 JSON file. 8 JSON file.
9 """ 9 """
10 10
11 import json 11 import json
12 import os
13 import time 12 import time
14 import typing 13 import typing
15 14
16 from PyQt5.QtCore import QObject 15 from PyQt5.QtCore import QObject
17 16
47 @param filename name of the user project file 46 @param filename name of the user project file
48 @type str 47 @type str
49 @return flag indicating a successful write 48 @return flag indicating a successful write
50 @rtype bool 49 @rtype bool
51 """ 50 """
52 name = os.path.splitext(os.path.basename(filename))[0]
53
54 debuggerPropertiesDict = {} 51 debuggerPropertiesDict = {}
55 debuggerPropertiesDict["header"] = { 52 debuggerPropertiesDict["header"] = {
56 "comment": f"eric debugger properties file for project {name}", 53 "comment": "eric debugger properties file for project {0}".format(
54 self.__project.getProjectName()),
57 "warning": "This file was generated automatically, do not edit.", 55 "warning": "This file was generated automatically, do not edit.",
58 } 56 }
59 57
60 # TODO: replace 'XMLTimestamp' by 'Timestamp' 58 # TODO: replace 'XMLTimestamp' by 'Timestamp'
61 if Preferences.getProject("XMLTimestamp"): 59 if Preferences.getProject("XMLTimestamp"):

eric ide

mercurial