From 9e52d6ccc652156c34f69b0c8e614900f7bbd0a9 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 6 Oct 2013 21:17:02 +0200 Subject: makeSip6: Remove clear Signed-off-by: Michael Buesch --- libtoprammer/chips/microchip8/makeSip6.py | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'libtoprammer/chips/microchip8') diff --git a/libtoprammer/chips/microchip8/makeSip6.py b/libtoprammer/chips/microchip8/makeSip6.py index efe1bfe..8a72d0c 100644 --- a/libtoprammer/chips/microchip8/makeSip6.py +++ b/libtoprammer/chips/microchip8/makeSip6.py @@ -26,27 +26,6 @@ import re import sys import os -def clear(): - inputFileName = '__init__.py' - tmpFileName = 'tmp' - fin = open(inputFileName) - ftmp = open(tmpFileName, 'w') - isToBeRemoved = False - for line in fin: - if isToBeRemoved: - matchObj = re.match('.*(pic\w+).*', line) - if matchObj: - print('removing file {}'.format(matchObj.group(1))) - os.remove('{}.py'.format(matchObj.group(1))) - else: - ftmp.write(line) - matchObj = re.match('#.*', line) - if matchObj: - isToBeRemoved = True - fin.close() - ftmp.close() - os.rename(tmpFileName, inputFileName) - def substitute(input, oldSocket, newSocket): input = re.sub('(^\s*packages).*', lambda m:'{} = (("DIP10", ""), ),'.format(m.group(1)), input) input = re.sub('(^\s*chipPackage).*', lambda m:'{} = "DIP10",'.format(m.group(1)), input) @@ -89,7 +68,6 @@ def makeSip(): print ('{} - {}'.format(item[0], item[1])) def main(argv): - #clear() makeSip() if __name__ == "__main__": -- cgit v1.2.3