python open folder in explorer
import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')
python open folder in explorer
import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')
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)])
python open file from explorer
import sys
path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(path)
import subprocess
subprocess.Popen('explorer "C:\temp"')
how to open folder in python
import webbrowser
path = "C:/Users/Username/PycharmProjects"
webbrowser.open(path) # Opens 'PycharmProjects' folder.
how to open file explorer in python
import easygui
file = easygui.fileopenbox()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us