Python Handle Code Blocks And Define Scope In Project