build-tools/clean_gtkw.py
def clean_gtkw_file(fName, overwrite=False):
    ''' returns True if .gtkw file is dirty '''
    with open(fName, 'r') as f:
        lines = f.readlines()

    dirty_flag = False
    for i, l in enumerate(lines[:N_LINES]):
        cl = clean_line(l)
        if cl != l:
            # print(l, "-->", cl)
            dirty_flag = True
            lines[i] = cl

    if dirty_flag and overwrite:
        print('cleaning', fName)
        with open(fName, 'w') as f:
            f.writelines(lines)
        return False

    if dirty_flag:
        print('dirty', fName)

    return dirty_flag
 returns True if .gtkw file is dirty 
returns True if .gtkw file is dirty
returns True if . gtkw file is dirty
def clean_gtkw_file(fName, overwrite=False):
    with open(fName, 'r') as f:
        lines = f.readlines()
    dirty_flag = False
    for i, l in enumerate(lines[:N_LINES]):
        cl = clean_line(l)
        if cl != l:
            dirty_flag = True
            lines[i] = cl
    if dirty_flag and overwrite:
        print('cleaning', fName)
        with open(fName, 'w') as f:
            f.writelines(lines)
        return False
    if dirty_flag:
        print('dirty', fName)
    return dirty_flag
def clean_gtkw_file ( fName , overwrite = False ) : with open ( fName , 'r' ) as f : lines = f . readlines ( ) dirty_flag = False for i , l in enumerate ( lines [ : N_LINES ] ) : cl = clean_line ( l ) if cl != l : dirty_flag = True lines [ i ] = cl if dirty_flag and overwrite : print ( 'cleaning' , fName ) with open ( fName , 'w' ) as f : f . writelines ( lines ) return False if dirty_flag : print ( 'dirty' , fName ) return dirty_flag
returns True if .gtkw file is dirty
returns True if . gtkw file is dirty
''' returns True if .gtkw file is dirty ''' # print(l, "-->", cl)
fName
overwrite