isa_parser.py (7720:65d338a8dba4) | isa_parser.py (7756:846fb3ffe0dc) |
---|---|
1# Copyright (c) 2003-2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 1931 unchanged lines hidden (view full) --- 1940 f.close() 1941 if contents != old_contents: 1942 print 'Updating', file 1943 os.remove(file) # in case it's write-protected 1944 update = True 1945 else: 1946 print 'File', file, 'is unchanged' 1947 else: | 1# Copyright (c) 2003-2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 1931 unchanged lines hidden (view full) --- 1940 f.close() 1941 if contents != old_contents: 1942 print 'Updating', file 1943 os.remove(file) # in case it's write-protected 1944 update = True 1945 else: 1946 print 'File', file, 'is unchanged' 1947 else: |
1948 print 'Generating', file | 1948 print ' [GENERATE]', file |
1949 update = True 1950 if update: 1951 f = open(file, 'w') 1952 f.write(contents) 1953 f.close() 1954 1955 # This regular expression matches '##include' directives 1956 includeRE = re.compile(r'^\s*##include\s+"(?P<filename>[\w/.-]*)".*$', --- 98 unchanged lines hidden --- | 1949 update = True 1950 if update: 1951 f = open(file, 'w') 1952 f.write(contents) 1953 f.close() 1954 1955 # This regular expression matches '##include' directives 1956 includeRE = re.compile(r'^\s*##include\s+"(?P<filename>[\w/.-]*)".*$', --- 98 unchanged lines hidden --- |