R and python script