python 查看源代码

Posted bloglxc

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 查看源代码相关的知识,希望对你有一定的参考价值。

使用包inspect

1 import inspect
2 from mxnet import contrib

 查看模块所在路径:

1 inspect.getsourcefile(contrib)

查看源码:

1 inspect.getsourcelines(contrib)

 

参考:https://zhuanlan.zhihu.com/p/37095163

以上是关于python 查看源代码的主要内容,如果未能解决你的问题,请参考以下文章