python script to create images