show how to generate a source file with python