From d0ca42b5bfebac9a98ecb435e5debf598b0248db Mon Sep 17 00:00:00 2001 From: amcones <26200600+amcones@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:43:47 +0800 Subject: [PATCH] feat: support mac and linux --- DecryptPDF.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DecryptPDF.py b/DecryptPDF.py index 5bba79b..8d2f2a8 100644 --- a/DecryptPDF.py +++ b/DecryptPDF.py @@ -6,6 +6,7 @@ import pikepdf, tkinter, os from tkinter import filedialog from pathlib import Path +import subprocess, platform print(' ***** NOTICE: MAKE SURE THAT THIS WINDOW IS ACTIVE BEFORE PRESSING ENTER *****') input("\n Let's select your PDF file!\n Press Enter :-)") @@ -35,4 +36,9 @@ input('\n\n Press Enter to exit the program and open the folder :-]') -os.startfile(destDir) +if platform.system() == "Windows": + os.startfile(destDir) +elif platform.system() == "Darwin": # macOS + subprocess.run(["open", destDir]) +else: # Linux + subprocess.run(["xdg-open", destDir])