Python os.rename if file system is full -


i'm asking beacause there's no way try myself (if there's 1 share please (:).

i'm doing file handling python os library, file moving/renaming os.rename().

python docs explains of exceptions function might raise here, not full file system case. guess raises ioerror, right?

cheers.

in practice should come up, if want test i'd recommend creating small file system (i don't know os on, on virtual partition, ram disk, flash drive, etc.) , loading garbage files see happens. maybe:

abignumber = 100000000000000000000000000000000 counter = 0 while (true):     counter += 1     anotherfile = open(`counter` + ".txt", "wb")     anotherfile.write("0" * abignumber)     anotherfile.close() 

when exception, should able verify disk full , you'll know kind of error expect.


Comments