Added ability to open the export folder. Makes it easier when testing instead of browsing like a sucker.

This commit is contained in:
Joey Payne 2014-09-29 21:21:01 +13:00
commit 7a3e98b769
3 changed files with 24 additions and 1 deletions

View file

@ -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)