R and python file generators