Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; '101': 0.09; 'subject:files': 0.09; 'python': 0.11; 'url:)': 0.14; 'file,': 0.15; 'script?': 0.16; 'scripts.': 0.16; 'tally': 0.16; 'helper': 0.18; "shouldn't": 0.18; 'thanks,': 0.19; 'candidates': 0.21; 'from:addr:chris': 0.22; "i've": 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'converting': 0.27; "i'm": 0.29; 'received:dreamhost.com': 0.29; 'received:g.dreamhost.com': 0.29; 'subject:other': 0.29; 'function': 0.30; '(i.e.,': 0.31; 'received:10.0.0': 0.32; 'common': 0.33; 'utility': 0.33; 'subject:?': 0.34; 'received:10.0': 0.34; 'file': 0.34; 'to:addr :python-list': 0.35; 'but': 0.36; 'url:org': 0.36; 'created': 0.36; 'there': 0.36; 'basic': 0.36; 'received:10': 0.37; 'names': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'times': 0.61; 'card': 0.63; 'subject:there': 0.66; 'obvious': 0.72; 'subject:calls': 0.84; 'dozen': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cdreimer.com; h=message-id :date:from:mime-version:to:subject:content-type: content-transfer-encoding; s=cdreimer.com; bh=z6fRRbq00Kk+89Meoj rtVjbx/3U=; b=v7djrwglE7USjpHNphm0cNes6lR0mJasUs4hgR0ZUFV4GywkI9 927ft9We1vWAT5CoHKWmgTlry+GgyJjzv0ZG9XTucCgTEk4etufG48lHWU/TtTna B95Q9oFlw3w51xA4/9tUrRRcYgA3DffSrApaNlr29RuCO6dHrtyDkCfhA= Date: Sat, 13 Jun 2015 12:10:02 -0700 From: "C.D. Reimer" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Is there a utility to tally function calls from other files? Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434222613 news.xs4all.nl 2853 [2001:888:2000:d::a6]:54969 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92594 Greetings, I'm converting 101 BASIC games from an old book (http://www.atariarchives.org/basicgames/) into Python scripts. After a dozen conversions, I've created a helper file for common functions (i.e., pick_card(), replay_game() and roll_dice()). The functions for card and dice games are obvious candidates for the helper file, but other functions that might be one offs that shouldn't be included. Is there utility that will take the function names from the helper file and scan the other files to tally up how many times a particular function got called? Or do I need to write a script? Thanks, Chris R.