EdmontonPy
Inspired by the Python community, we hope to foster a strong, supportive, and proficient Python community in the Edmonton area.
edmontonpy.com
@edmontonpy
edmontonpy.slack.com
Oliver Antoniu
Bryan Hyshka
Latest Python at 3.7.1
Deleting a File on a file system
import contextlib
with contextlib.suppress(FileNotFoundError):
os.remove('somefile.tmp')
# This is equivalent to the following try/except clause:
try:
os.remove('somefile.tmp')
except FileNotFoundError:
pass
By EdmontonPy
Inspired by the Python community, we hope to foster a strong, supportive, and proficient Python community in the Edmonton area.