On Thu, Oct 2, 2014 at 11:34 PM, Viet Nguyen <vhnguy...@yahoo.com.dmarc.invalid> wrote: > Hi, > > When I am debug mode, is there some command which will help display the > source code for a Python function of interest? Much like you'd use "info > proc" to display contents of Tcl proc. > > Thanks, > Viet
You can use inspect.getsource() to get the source code for a function, class, or module. The source must be available at whatever location the module was imported from, and of course it won't work for anything implemented in C. -- https://mail.python.org/mailman/listinfo/python-list