I'll try to describe the problem in a simple way.
I have a .txt file that I can not know the full name of it which located under constant path
[for example: the full name is: Hello_stack.txt, I only can give to function the part: 'Hello_']
the input is: Path_to_file/ + 'Hello_' the expected output is: Path_to_file/Hello_stack.txt
How can i do that?
I tried to give a path and check recursively if part of my file name is exist and if so, to return it's path.
this is my implementation: [of course I'd like to get another way if it works]
def get_CS_R2M_METRO_CALLBACK_FILE_PATH():
    directory = 'path_of_file'
    file_name = directory + 'part_of_file_name'
    const_path = Path(file_name)
    for path in [p for p in const_path.rglob("*")]:
        if path.is_file():
            return path
        
Thanks for help.
