Created
May 31, 2019 10:17
-
-
Save dl6nm/3397bf251a33488d449bd8df800d3bee to your computer and use it in GitHub Desktop.
Open a console window with current working directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Open a console window with current working directory""" | |
import os | |
import platform | |
if platform.system() == 'Windows': | |
os.system('powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList "/k", "cd", "{}""'.format(os.getcwd())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment