abstract syntax tree - Python ast and inspect.getsource() -


how can 1 make ast tree inspectable inspect.getsource()

exec(compile(create_module(...), 'foo.py', 'exec')) print(inspect.getsource(obj.instance.method)) 

inspect.getsource() returns newline terminated string.


Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -