2026-05-14 10:06:04 +02:00
|
|
|
|
import subprocess
|
|
|
|
|
|
import sys
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
|
BASE = Path(__file__).parent
|
|
|
|
|
|
|
|
|
|
|
|
MENU = [
|
|
|
|
|
|
("Calcola T ambiente (calcola_t_amb)", BASE / "start" / "calcola_t_amb.py"),
|
|
|
|
|
|
("Plot dati raw (plot_temperatura)", BASE / "start" / "plot_temperatura.py"),
|
|
|
|
|
|
("Induttore 1 [t = 110.81–111.56 s]", BASE / "induttore1" / "app1.py"),
|
|
|
|
|
|
("Induttore 2 [t = 112.02–113.95 s]", BASE / "induttore2" / "app2.py"),
|
|
|
|
|
|
("Induttore 3 [t = 115.0–133.7 s]", BASE / "induttore3" / "app3.py"),
|
2026-05-14 10:11:55 +02:00
|
|
|
|
("Report completo LaTeX", BASE / "report_completo.py"),
|
2026-05-14 10:06:04 +02:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2026-05-14 10:08:41 +02:00
|
|
|
|
while True:
|
|
|
|
|
|
print("\n=== Analisi Termica Forno ===\n")
|
|
|
|
|
|
for i, (label, _) in enumerate(MENU, 1):
|
|
|
|
|
|
print(f" {i}. {label}")
|
|
|
|
|
|
print(" 0. Esci\n")
|
2026-05-14 10:06:04 +02:00
|
|
|
|
|
2026-05-14 10:08:41 +02:00
|
|
|
|
scelta = input("Scegli: ").strip()
|
|
|
|
|
|
if scelta == "0":
|
|
|
|
|
|
break
|
|
|
|
|
|
if not scelta.isdigit() or not (1 <= int(scelta) <= len(MENU)):
|
|
|
|
|
|
print("Scelta non valida.")
|
|
|
|
|
|
continue
|
2026-05-14 10:06:04 +02:00
|
|
|
|
|
2026-05-14 10:08:41 +02:00
|
|
|
|
_, script = MENU[int(scelta) - 1]
|
|
|
|
|
|
subprocess.run([sys.executable, str(script)])
|
2026-05-14 10:06:04 +02:00
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
|
main()
|