gpython icon indicating copy to clipboard operation
gpython copied to clipboard

generate python source code

Open abduld opened this issue 7 years ago • 1 comments

given an ast, how does one generate the corresponding python source code

thank you

abduld avatar Oct 28 '18 20:10 abduld

The ast doesn't preserve the comments nor the fine code structure so you can't preserve the exact code structure.

You could traverse the ast to create some code which worked the same though.

There isn't a way of doing this right now, but it wouldn't be too tricky to implement.

Why do you want to do this?

ncw avatar Nov 02 '18 16:11 ncw