Added the execution of python script to accomodate switching on and off sockets