質問

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