Changing sh to py to be able to get variables