Using R and python do some funny things