Move source file into its own package
Prepare structure for refactoring
The script must take a least 3 arguments - if we need to log - if we need to send a mail - the path to the script to execute
Encapsulate parsing arguments inside a method
Encapsulate the execution of the external script in its own method

Step one : with no argument
Encapsulate the execution of the external script in its own method

Step two : with arguments
It is possible to log the script stdout into a log file

 - The log file path is given as first argument
 - The stdout result is stored in a temporary file in order to be reused later
We make sure that the new content of the log file is appended at the end instead of replacing the old content
Errors of the executed script are also logged into the log file
Can send the stdout script in an email if an address is given as parameter

The test is a bit tricky because we need an SMTP server in order to check if the email is sent correctly.
To do that we instantiate a simple implementation in its own thread because the server is wainting in a loop
that would otherwise block the test.
Don't forget to stop the thread after the test.
Make sure stderr is also sent if an address is given as parameter and that we change the subject accordingly

In the email tests we now pass a different port in each test for the SMTP server to listen to
because when 2 tests use it in a row the thread doesn't have the time to release the
port.
We can pass multiples receivers with comma separated emails address as parameter
When the python script is launch from the command line the first argument is one step ahead
Ready to send the mail with a gmail account

For the authentification the login and the password must be replaced with a valid
gmail account.
Read only once the temporary log file storing the script output

Instead of reading the file every time we need it we store the content in an attribute
so we can close the file ASAP
Simplify the array creation of the script and its arguments to execute
If the script to execute is not found we say it in the script output message
Print the executed script output (stdout + stderr) at the screen
Display the script test output
More proper way to parse command line arguments with parameters and help messages