Problem with profiler module

Tomaz Ficko mirko.ficko at uni-mb.si
Wed May 12 12:02:56 EDT 1999


I have problem with profiler module. Below is listing of python
interpreter session.  I can run profiler from command line with now
problem. What is the problem?

Python 1.5.2 (#1, Apr 30 1999, 22:36:07)  [GCC 2.7.2] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> def f(x):
	x.append(1)
	
	
>>> import profile
>>> a=[]
>>> profile.run('f(a)')
Traceback (innermost last):
  File "<pyshell#6>", line 1, in ?
    profile.run("f(a)")
  File "/usr/local/lib/python1.5/profile.py", line 62, in run
    prof = prof.run(statement)
  File "/usr/local/lib/python1.5/profile.py", line 348, in run
    return self.runctx(cmd, dict, dict)
  File "/usr/local/lib/python1.5/profile.py", line 354, in runctx
    exec cmd in globals, locals
  File "<string>", line 1, in ?
NameError: f




More information about the Python-list mailing list