kopia lustrzana https://github.com/micropython/micropython-lib
Clean sdcard test txt files to free card spaces.
rodzic
a1b9aa934c
commit
e22db4ab5a
|
@ -26,10 +26,10 @@ def sdtest():
|
||||||
print(n, "bytes written")
|
print(n, "bytes written")
|
||||||
n = f.write(lines)
|
n = f.write(lines)
|
||||||
print(n, "bytes written")
|
print(n, "bytes written")
|
||||||
|
|
||||||
with open(fn, "r") as f:
|
with open(fn, "r") as f:
|
||||||
result1 = f.read()
|
result1 = f.read()
|
||||||
print(len(result1), "bytes read")
|
print(len(result1), "bytes read")
|
||||||
|
os.remove(fn)
|
||||||
|
|
||||||
fn = "/fc/rats1.txt"
|
fn = "/fc/rats1.txt"
|
||||||
print()
|
print()
|
||||||
|
@ -37,10 +37,10 @@ def sdtest():
|
||||||
with open(fn, "w") as f:
|
with open(fn, "w") as f:
|
||||||
n = f.write(short) # one block
|
n = f.write(short) # one block
|
||||||
print(n, "bytes written")
|
print(n, "bytes written")
|
||||||
|
|
||||||
with open(fn, "r") as f:
|
with open(fn, "r") as f:
|
||||||
result2 = f.read()
|
result2 = f.read()
|
||||||
print(len(result2), "bytes read")
|
print(len(result2), "bytes read")
|
||||||
|
os.remove(fn)
|
||||||
|
|
||||||
os.umount("/fc")
|
os.umount("/fc")
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue