Quantcast
Viewing all articles
Browse latest Browse all 4615

Python • Reading/Writing to USB Drive

In Windows I have experience with making a GUI in Python in which I was taking data from a Microcontroller through UART and saving the data as text file after processing. This was all done in Python. The default location of the text file was the Python project folder but I guess this location could be another partition of the local drive, for example instead of D:\ this can be E:\. Considering both D:\ and E:\ are partitions of the local hard drive in addition to C:\. I used Python in Windows for making GUI based software.

Now I am wondering about RPi OS, in which we can also install Python, right ?

If we attach a USB 2.0 flash drive to the RPi Model 4, can we also save the data as text file in Python by just referring to the correct name and location of the USB 2.0 flash drive ?

We can also read the text or data file in Python in Windows. This is just one liner code. The same way can we also read the text file stored in USB 2.0 flash drive using Python ?

Reading/Writing to USB 2.0 flash drive attach to the RPi Model 4 is anything more or complex then described above ?

Statistics: Posted by TommyBills — Wed Jan 15, 2025 6:59 pm — Replies 1 — Views 50



Viewing all articles
Browse latest Browse all 4615

Trending Articles