Cancelling a subprocess based on its output

J

jelle

Hi,

I'm using the subprocess module to run a open-source lighting
simulation software, Radiance, and am using python to script it. When
Radiance finds a scene where no light is present its prints out
'warning - no light sources found' to the console. I'm looking for a
way to terminate the subprocess when this message is spitted out to the
console. Searching this forum on subprocess & stderr didn't lead to a
clue to solving this problem. I'm using both win32 & linux to run these
simulations, so a cross-platform way of doing this is important. Any
suggestions?

Cheers, Jelle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top