Re: [Tutor] how to determine where a module or function is called from

2007-02-22 Thread Lance Haig
Hi Kent, Thank you I was able to find it in the end. It was at the bottom of the file I was editing Lance Kent Johnson wrote: > Lance Haig wrote: >> I am debugging a script that was written by someone else and I was >> wondering if there is a way to determine where a function or module >

Re: [Tutor] how to determine where a module or function is called from

2007-02-22 Thread Kent Johnson
Lance Haig wrote: > I am debugging a script that was written by someone else and I was > wondering if there is a way to determine where a function or module is > imported from You can use the __file__ attribute of a module: In [9]: csv.__file__ Out[9]: '/Library/Frameworks/Python.framework/Vers

Re: [Tutor] how to determine where a module or function is called from

2007-02-22 Thread Alan Gauld
"Lance Haig" <[EMAIL PROTECTED]> wrote >I am debugging a script that was written by someone else and I was > wondering if there is a way to determine where a function or module > is > imported from >>> import time >>> print time >>> time.__file__ '/usr/lib/python2.4/lib-dynload/time.dll' >>> H