def dw_WriteNrSegments(fname, nr):
    """ 
    Writes the number of segments to B3 file 
    
    B3\\_nrofseg.inc
    """
    exfile = open(fname, 'w')
    print(';Written by dw_WriteNrSegments', file=exfile)
    print(str(nr) + ' ; nr of segments', file=exfile)
    exfile.close()
