From: duplo Date: Thu, 11 Dec 2008 19:38:40 +0000 (+0000) Subject: Add the createBertosProject function. This function create the project directory... X-Git-Tag: 2.1.0~669 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=34c3c0f30b57a054f4018887118d80709f54c25c;p=bertos.git Add the createBertosProject function. This function create the project directory and the empty bertos project file. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2013 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/libbertos.py b/wizard/libbertos.py index 5951cea3..4d8e8c37 100644 --- a/wizard/libbertos.py +++ b/wizard/libbertos.py @@ -21,4 +21,14 @@ def bertosVersion(directory): qfile = QFile(version_file) qfile.open(QIODevice.ReadOnly) file = QTextStream(qfile) - return file.readLine() \ No newline at end of file + version = file.readLine() + qfile.close() + return version + +def createBertosProject(directory): + bertos_directory = directory + QDir().mkdir(directory) + bertos_project = directory + QDir.separator() + "project.bertos" + qfile = QFile(bertos_project) + qfile.open(QIODevice.WriteOnly) + qfile.close() \ No newline at end of file