python get a file from path and keep only the name code example
Example: python file from path
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
import os
dir_path = os.path.dirname(os.path.realpath(__file__))