Add calibration utilities

This commit is contained in:
Simon Alibert
2025-03-30 15:41:39 +02:00
parent 50963fcf13
commit d6007c6e7d
5 changed files with 277 additions and 54 deletions

View File

@@ -17,7 +17,9 @@ import logging
import os
import os.path as osp
import platform
import select
import subprocess
import sys
from copy import copy
from datetime import datetime, timezone
from pathlib import Path
@@ -228,3 +230,7 @@ def is_valid_numpy_dtype_string(dtype_str: str) -> bool:
except TypeError:
# If a TypeError is raised, the string is not a valid dtype
return False
def _enter_pressed() -> bool:
return select.select([sys.stdin], [], [], 0)[0] and sys.stdin.readline().strip() == ""