From: duplo Date: Mon, 19 Apr 2010 08:41:57 +0000 (+0000) Subject: Add preset loading function. X-Git-Tag: 2.5.0~459 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=4b70a014699bc724697a20d6abb1e78be00d1e29;p=bertos.git Add preset loading function. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3449 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BProject.py b/wizard/BProject.py index 866d5be9..5ecf7f22 100644 --- a/wizard/BProject.py +++ b/wizard/BProject.py @@ -117,10 +117,8 @@ class BProject(object): setEnabledModules(self, project_data["ENABLED_MODULES"]) def loadProjectPresets(self, preset_directory): - # This method will save: - # "CPU_NAME" - # ... - pass + preset_prj_file = os.path.join(preset_directory, 'project.bertos') + preset_data = pickle.loads(open(preset_prj_file, "r").read()) def loadModuleData(self, edit=False): module_info_dict = {}