android - PYthon, Deleting my DCIM File -


hey using qpython3 , want delete dcim-file using python, still doesn´t work. using motorola moto g 2. android 4.4: here´s code have change?

import os path = os.environ["sdcard"] + "/dcim" if os.path.exists(path) == true:     print(path, "exists.")     os.remove(path)     print("file succesfully deleted.") else:     print(path,"file not existing.") 

keyerror: b "sdcard"

thank yuór answers.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -