Is there any way that you can check if a file exists in the same folder as the program without using:
os.path.isfile or os.path.exists You can still use os.path without 'changing paths all the time', as you outlined in your comment.
import os def is_file_in_app_path(filename): app_path = os.path.dirname(os.path.realpath(__file__)) file_path = os.path.join(app_path, filename) return os.path.exists(file_path) Fixed as per @tdelaney's comment.
os.path.join is a platform independent version of '/'.join(...)
os.path?