@@ -0,0 +1,1608 @@
+#! Folder.py%0A%0A%22%22%22%0AThis module includes the Folder and sub-folder classes%0A%22%22%22%0Aimport os%0Aimport subprocess%0A%0Aclass Folder:   %0A    def __init__(self, name, path):  %0A        self.name = name%0A        self.path = path%0A        self.dir = os.path.join(path,name)%0A        self.logfile = os.path.join(self.dir,name + '.log')%0A        %0A    def create(self): #Create new project Folder (if doesn't exist)%0A        try:%0A            os.stat(self.dir)%0A        except:%0A            os.mkdir(self.dir)%0A%0A    def subfolder(self,file): #create subfolders%0A         f = open(file,'r')%0A         lst = f.readlines()%0A         f.close()%0A%0A         for folder in lst:%0A             fold = os.path.join(x.dir,folder.rstrip())%0A             try:%0A                 os.mkdir(fold)%0A             except:%0A                 continue%0A                  %0A    def updateLog(self,text): #Create/update log file%0A        try:%0A            f=open(self.logfile,'r')%0A            logtxt=f.read()%0A            f.close%0A        except:%0A            logtxt=''%0A%0A        logtxt += (text + '%5Cn')%0A        g = open(self.logfile,'w')%0A        g.write(logtxt)%0A        g.close%0A%0A    def openFolder(self):%0A        subprocess.call(%5B'explorer',self.dir%5D)%0A%0A        %0A        %0A%0A%0Aif __name__ == '__main__':%0A    import os%0A    x = Folder('ENG0001', r'C:%5CUsers%5Cfviallevieille%5CPythonTest')%0A    print('-' * 10)%0A    print(x.name)%0A    print(x.path)%0A    print(x.dir)%0A    print(x.logfile)%0A    print('-' * 10)%0A%0A    x.create()%0A    x.updateLog('New Log')%0A    x.updateLog('Second Log')%0A    file = r'C:%5CUsers%5Cfviallevieille%5CPythonTest%5Cbuild.txt'%0A    x.subfolder(file)%0A    x.openFolder()%0A        %0A    %0A

Revert "Revert "Signed-off-by: <fviallevieille@PC0004.rlcgen1.local>""