import subprocess path = r"C:/Users/Χρήστος/Desktop/Papinhio player old/notes/cases.txt" subprocess.Popen(r'explorer /select,"'+path+'"')
When i run the up code i supposed to open the folder C:/Users/Χρήστος/Desktop/Papinhio player old/notes/ and highlight-select the file cases.txt
The folder and the file exists (for example: cd C:/Users/Χρήστος/Desktop/Papinhio player old/notes/ works.
I think the above code worked before some months, i don't know now why doesn't work. I have tried to run the code with two python versions: 3.9.2 and 3.8.9
Can you help me please about?
Instead of this, it opens the My Computer Explorer window.

I found the problem:
import subprocess
import os
path = "C:/Users/Χρήστος/Desktop/Papinhio player old/notes/cases.txt"
path = os.path.abspath(path)
path = path.replace('/', '\\')
subprocess.Popen(r'explorer /select,"'+path+'"', shell=True)
But if there is a nicer answer i would like to know.