def list2file(mylist,path):
    try:
        with open(path,'w') as f:
            for item in mylist:
                f.write("{}\r\n".format(item))
        return True
    except Exception as err:
        sys.stderr.write(str(err))
        sys.stderr.write('\n')
        return False
dumps a list into a text file, one line per item
dataset/ETHPy150Open FredHutch/swift-commander/swift_commander/swsymlinks.py/list2file