USB file I/O from python on WR41

I’m trying to get a python program to periodically append data to a file on a USB stick. I’m having two problems:

  1. despite opening the file per the instructions on the web site (using A/gcp.log to indicate file gcp.log on the first USB device), the file is never written to the USB stick, but instead to the built-in flash.

  2. despite opening the file in append mode (using “a”), the existing data in the file is always overwritten.

I found something that appeared to be release notes for a firmware update that seemed to claim that the latter problem was recently fixed, but not for USB devices?

never mind. it appears that for this device the Digi python documentation is wrong about how you access files on the USB stick.

open (‘u:filename.ext’, ‘a’)

seems to work ok.

another note: apparently you can only have one file open on the USB device at a time?

I like this forum, amazing and very informative,