not logged in | [Login]

(Construction) Examples on how to use the SD card.

Conflict about SD card access when connected to host machine. Its mounted as a Drive. But if its mounted as a drive then its ot available for the embedded CPU to use.

Note: Once you've opened a file. You can readlines() as usual but there is an issue with lists. .readlines() can be written as the equivalent list(f) if you really need the list of lines.

E.g. Compare these approaches:

fileobj = f.open()
for line in fileobj:
    print line
fileobj = f.open()
for line in fileobj.readlines():
    print line
fileobj = f.open()
lines = list(fileobj.readlines())
for line in lines:
    print line