Is there a utility to tally function calls from other files?

C.D. Reimer chris at cdreimer.com
Sat Jun 13 15:53:43 EDT 2015


On 6/13/2015 12:31 PM, Chris Angelico wrote:
> Depending on your requirements, it could be anywhere from easy to
> hard. Good luck:)

I don't have  grep on my Windows machine. Writing a script might be easier.

Each file has a import statement for the helper file:

     from bg_helper import replay_game, roll_dice

I just need to grab the function names from the helper file, walk the 
directory, find the import line from each file, and parse each line for 
the function names to build the tally.

Thanks,

Chris R.




More information about the Python-list mailing list