Answers for "python open explorer folder"

4

python open folder in explorer

import subprocess
subprocess.Popen(r'explorer /select,"C:pathoffolderfile"')
Posted by: Guest on January-15-2021
3

how to open file explorer in python

import os
import subprocess
FILEBROWSER_PATH = os.path.join(os.getenv('WINDIR'), 'explorer.exe')

def explore(path):
    # explorer would choke on forward slashes
    path = os.path.normpath(path)

    if os.path.isdir(path):
        subprocess.run([FILEBROWSER_PATH, path])
    elif os.path.isfile(path):
        subprocess.run([FILEBROWSER_PATH, '/select,', os.path.normpath(path)])
Posted by: Guest on May-26-2020
-1

how to open file explorer in python

import easygui
file = easygui.fileopenbox()
Posted by: Guest on May-26-2020

Code answers related to "python open explorer folder"

Python Answers by Framework

Browse Popular Code Answers by Language