How to write a python code in GNU?

I was wondering if it is possible to create a python code in GNURadio
instead of creating the flow chart? like instead of generating a python
code like normal, is it possible to do it backwards , as in make a
python code that will create the flowchart.

If it is possible could someone explain step by step how to run the
attach file in python, which will create the flow chart?