V5 python read and write to file on sd card

You may find these pages helpful: