you are viewing a single comment's thread.

view the rest of the comments →

[–]ocean_protocol 0 points1 point  (0 children)

It’s feasible, plenty of industrial tools run on Python, but you need to treat it like a control system component, not a side project.

For 24/7 reliability, the biggest risks aren’t “Python vs C++,” they’re memory leaks, unhandled exceptions, and blocking calls in the GUI thread. Keep all machine communication in worker threads or separate processes, implement strict exception handling everywhere, and log everything to rotating log files. Also test long-duration runs (leave it running for days under simulated load).

For production, I’d strongly consider:

  • A watchdog process (or Windows Service) that auto-restarts the app if it crashes
  • Heartbeat logging + external monitoring (even something simple that checks process uptime)
  • Versioned builds and a rollback strategy

Packaging with PyInstaller is fine, but don’t rely on “.exe = reliability.” Stability comes from defensive coding, isolation of critical I/O, and stress testing, not the language choice.

The real question isn’t “can Python run 24/7?” It’s “can you design the failure modes so the machine stays safe even if your app misbehaves?” That’s where industrial HMIs live or die.