This dilemma is in the collective: a subcommunity described by tags with suitable written content and professionals. The Overflow Blog siteIf you're on Python two, you are able to backport the pathlib module from pypi, pathlib2, or usually Verify isfile within the os.path module:The Welsh DragonThe Welsh Dragon 52911 gold badge77 silver badges2020