File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 99import tkinter as tk
1010from tkinter import messagebox , filedialog , ttk
1111import json
12+ import subprocess
13+ import platform
1214from typing import Callable
1315import serial .tools .list_ports # type: ignore
1416
@@ -551,8 +553,13 @@ def confirm_selection():
551553
552554 def open_documentation (self ):
553555 """Handler for the 'Documentation' menu item."""
554- print ("Open Documentation" )
555- messagebox .showinfo ("Documentation" , "Documentation not available yet." )
556+ file_path = "_internal/Assets/ArduinoLogique_Document_utilisateur.pdf"
557+ if platform .system () == "Windows" :
558+ subprocess .Popen (['start' , file_path ], shell = True )
559+ elif platform .system () == "Darwin" : # macOS
560+ subprocess .Popen (['open' , file_path ])
561+ else : # Linux and other Unix-like systems
562+ subprocess .Popen (['xdg-open' , file_path ])
556563
557564 def about (self ):
558565 """Handler for the 'About' menu item."""
You can’t perform that action at this time.
0 commit comments