Which one should I use to maximize performance? os.path.isfile(path) or open(path)?
Afaik isfile() will be faster while open(path) is more secure, in the sence that if open() is able to actually open the file, you can be sure it's there.
checking if file exists: performance of isfile Vs open(path)