open directory with python code example
Example 1: python open folder
import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')
Example 2: python file directory
from os import path
dir_path = path.dirname(__file__)
import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')
from os import path
dir_path = path.dirname(__file__)