Added ability to open the export folder. Makes it easier when testing instead of browsing like a sucker.
This commit is contained in:
parent
7bb701ebf5
commit
7a3e98b769
3 changed files with 24 additions and 1 deletions
10
utils.py
10
utils.py
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import print_function
|
||||
import os, zipfile, io, platform
|
||||
import sys, tempfile
|
||||
import subprocess
|
||||
|
||||
DEBUG = False
|
||||
|
||||
|
|
@ -14,6 +15,15 @@ def log(*args):
|
|||
if DEBUG:
|
||||
print(*args)
|
||||
|
||||
|
||||
def open_folder_in_explorer(path):
|
||||
if platform.system() == "Windows":
|
||||
os.startfile(path)
|
||||
elif platform.system() == "Darwin":
|
||||
subprocess.Popen(["open", path])
|
||||
else:
|
||||
subprocess.Popen(["xdg-open", path])
|
||||
|
||||
def zip_files(zip_file_name, *args, **kwargs):
|
||||
zip_file = zipfile.ZipFile(zip_file_name, 'w')
|
||||
verbose = kwargs.pop('verbose', False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue