changing subprocess to sh python module