문제

In python we can use the following:

symtable.symtable(code,file,compile type)

But is it possible to get a symtable object a current executable code?

도움이 되었습니까?

해결책

The executable code itself carries that information. See the inspect module documentation, but code objects have co_names and co_varnames, for example.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top