Is there a utility to tally function calls from other files?
Chris Angelico
rosuav at gmail.com
Sat Jun 13 15:58:28 EDT 2015
On Sun, Jun 14, 2015 at 5:53 AM, C.D. Reimer <chris at cdreimer.com> wrote:
> 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.
Hmm, I think the Windows 'find' command can do the same sort of job.
Though it's not hard to grab a Windows port of grep and use that.
Should be easier than writing your own script.
ChrisA
More information about the Python-list
mailing list