Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed0.kamp.net!newsfeed.kamp.net!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!takemy.news.telefonica.de!telefonica.de!newsfeed.xs4all.nl!newsfeed3a.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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'skip:" 60': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'def': 0.12; 'wrote': 0.14; 'kern': 0.16; 'nameerror:': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'either.': 0.24; 'skip:l 30': 0.24; 'skip:" 30': 0.26; 'pass': 0.26; 'defined': 0.27; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; 'robert': 0.30; "skip:' 10": 0.31; 'subject:what': 0.31; 'file': 0.32; '(most': 0.33; 'no,': 0.35; 'subject:?': 0.36; 'to:addr:python- list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'profile': 0.61; 'name': 0.63; 'results': 0.69; 'repeat': 0.74; 'received:139': 0.84; 'subject:skip:l 10': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Neal Becker Subject: Re: line_profiler: what am I doing wrong? Date: Fri, 13 Feb 2015 08:35:13 -0500 References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: exa2-in-fw-01-epn.hns.com User-Agent: KNode/4.14.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1423834808 news.xs4all.nl 2973 [2001:888:2000:d::a6]:57297 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:85641 Robert Kern wrote: > @profile > def run(): > pass > > run() No, this doesn't work either. Same failure kernprof -l test_prof.py Wrote profile results to test_prof.py.lprof Traceback (most recent call last): File "/home/nbecker/.local/bin/kernprof", line 9, in load_entry_point('line-profiler==1.0', 'console_scripts', 'kernprof')() File "/home/nbecker/.local/lib/python2.7/site-packages/kernprof.py", line 221, in main execfile(script_file, ns, ns) File "test_prof.py", line 1, in @profile NameError: name 'profile' is not defined -- -- Those who don't understand recursion are doomed to repeat it