collect python code