I am running some shell test scripts from a python script under Windows. The shell scripts are testing the functionality of various modules.
The problem that I faced is that some scripts can hang. For this I added a timeout for each script. This timeout has a default value. But this timeout value can be changed by the bash script – from a bash function ( SetMaxTime ) – I can modify SetMaxTime.
When the default value is used I wait for that period of time in python and if the bash script is not done I will consider that test as failed due to timeout.
The problem is when the default value of timeout is changed from bash. Is there a way to communicate with a bash script (ran with mingw) from python?
NOTE: The scripts are ran under Windows.
Sure you can communicate between them, just read/write from a file or pair of files (one for Python to write to and the bash script to read from, and the other for the visa-versa situation).