From: duplo Date: Thu, 11 Dec 2008 14:33:19 +0000 (+0000) Subject: Add libbertos module, a module containing a group of tools for handling bertos sources X-Git-Tag: 2.1.0~676 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d318de45abe59e324d8fb574f692cb46b6121f9a;p=bertos.git Add libbertos module, a module containing a group of tools for handling bertos sources git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2006 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/libbertos.py b/wizard/libbertos.py new file mode 100644 index 00000000..5951cea3 --- /dev/null +++ b/wizard/libbertos.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# encoding: utf-8 +# +# Copyright 2008 Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# $Id:$ +# +# Author: Lorenzo Berni +# + +from PyQt4.QtCore import * + +def isBertosDir(directory): + version_file = directory + QDir.separator() + "VERSION" + qfile = QFile(version_file) + return qfile.exists() + +def bertosVersion(directory): + version_file = directory + QDir.separator() + "VERSION" + qfile = QFile(version_file) + qfile.open(QIODevice.ReadOnly) + file = QTextStream(qfile) + return file.readLine() \ No newline at end of file