add option to open folder
This commit is contained in:
parent
aba444e2c4
commit
216cb411fe
3 changed files with 33 additions and 0 deletions
|
|
@ -329,3 +329,10 @@ def makefolder(path):
|
|||
dirname = os.path.dirname(path)
|
||||
if not os.path.exists(dirname):
|
||||
os.makedirs(dirname)
|
||||
|
||||
|
||||
def open_folder(folder):
|
||||
cmd = 'open'
|
||||
if sys.platform.startswith('linux'):
|
||||
cmd = 'xdg-open'
|
||||
subprocess.Popen([cmd, folder], close_fds=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue