0

Python newbie here. Sorry if I am a bit unclear. I have a Python script that reads temperature, and I have another script that grabs the temperature value from the first one. If the first script terminates, the second will terminate with it.

How can I keep the second sript from terminating?

Thank you ;)

1

1 Answer 1

1

This isn't a direct answer to your question, but it's more of a directional consideration that you need to think about.

Since you're talking about temperature monitoring, it's a classic example for a Publish Subscribe model. Recently protocols like MQTT have gained in popularity, and is really helpful for the scenario that you're in.

You should really design your application with scalability in mind and explore before just using threaded python code. There's a cool python example here for MQTT.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.