def truncateFile(fileNameString, tooBig=50000):
    if os.path.getsize(fileNameString) > tooBig:
        fh = open(fileNameString, 'rb+')
        fh.seek(-tooBig, 2) 
        data = fh.read()
        fh.seek(0) # rewind
        fh.write(data)
        fh.truncate()
        fh.close()
Disable DHCP for a network if DHCP is still active.
dataset/ETHPy150Open benedictpaten/jobTree/src/jobTreeSlave.py/truncateFile--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/cmd/netns_cleanup.py/kill_dhcp