简体   繁体   中英

How to get Class and Function Names from a Library?

I'm doing research that requires the collation of class names and their function names for three libraries: Perl; Python; and Ruby.

I have downloaded the online libraries (.tar files), but I have not installed them (they require additional libraries). Now I need to obtain the class names and their function names from each library.

Obviously regular expression will barely work. I have received some hints like “write a simple script in (eg.) Python to inspect the Python library”, but I don't know how to do that.

I will appreciate any help or comments!

For Perl, there is Class::Inspector , for python there is inspect . Ruby, I don't know. The term you should search for is "introspection".

Also available for Perl is PPR , the Perl Pattern Recognizer, a regular expression that parses all of Perl.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM