print("Calling LibreOffice python\n") print(check_output(["{}".format(OPENOFFICE_PYTHON), script, source], shell=True).decode()) It work when just running normally ...