From 7d878b0d14f91329c3e204977ff77c30c31046dd Mon Sep 17 00:00:00 2001 From: duplo Date: Thu, 2 Apr 2009 10:57:25 +0000 Subject: [PATCH] Add comments for codelite_project module functions git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2465 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/codelite_project.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wizard/codelite_project.py b/wizard/codelite_project.py index d6fe4d43..a8739d0a 100644 --- a/wizard/codelite_project.py +++ b/wizard/codelite_project.py @@ -14,6 +14,10 @@ import os import const def clFiles(file_dict, directory): + """ + Creates the list of the lines for the files founded in file_dict, using + directory as the base folder. + """ filelist = [] filelist.append("" %os.path.basename(directory)) for f in file_dict[directory]["files"]: @@ -24,6 +28,10 @@ def clFiles(file_dict, directory): return filelist def findSources(path): + """ + Analyzes the directory tree from path and return a dict with filename and + path. + """ file_dict = {} for root, dirs, files in os.walk(path): if root.find("svn") == -1: @@ -37,6 +45,9 @@ def findSources(path): return file_dict def codeliteProjectGenerator(project_info): + """ + Returns the string rapresenting the codelite project. + """ template = open("cltemplates/bertos.project").read() filelist = "\n".join(clFiles(findSources(project_info.info("PROJECT_PATH")), project_info.info("PROJECT_PATH"))) while template.find("$filelist") != -1: @@ -47,6 +58,9 @@ def codeliteProjectGenerator(project_info): return template def codeliteWorkspaceGenerator(project_info): + """ + Returns the string rapresentig the codelite workspace. + """ template = open("cltemplates/bertos.workspace").read() project_name = os.path.basename(project_info.info("PROJECT_PATH")) while template.find("$project") != -1: -- 2.25.1