factbook scripts in python