开发者

Python find out contents of compiled module?

开发者 https://www.devze.com 2023-04-05 08:08 出处:网络
So have this Python .pyd module (C++), so I can\'t ju开发者_JAVA技巧st open it in a text editor to find out what it contains. So how can I? I just want to know the function names inside it.Python have

So have this Python .pyd module (C++), so I can't ju开发者_JAVA技巧st open it in a text editor to find out what it contains. So how can I? I just want to know the function names inside it.


Python have full reflection.

You can do the following (for a modulename.pyd)

 python
 >>> import modulename as mtmp
 >>> dir(mtmp)
 >>> help(mtmp)

EDIT : Add help command as propose by Mike Graham

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号