On 23/04/2006, at 17:44, Jeff Watkins wrote:
If you need to follow the execution path taken you can use a debugger: In [8]: pdb.runcall(jsonify, 2) > <string>(5)jsonify() (Pdb) s --Call-- > /Users/alberto/build/bdist.darwin-8.4.0-Power_Macintosh/egg/dispatch/predicates.py(362)<lambda>() (Pdb) > /Users/alberto/build/bdist.darwin-8.4.0-Power_Macintosh/egg/dispatch/predicates.py(362)<lambda>() (Pdb) --Return-- > /Users/alberto/build/bdist.darwin-8.4.0-Power_Macintosh/egg/dispatch/predicates.py(362)<lambda>()->'__json__' (Pdb) --Call-- > /Users/alberto/build/bdist.darwin-8.4.0-Power_Macintosh/egg/dispatch/predicates.py(491)dispatch_by_truth() (Pdb) > /Users/alberto/build/bdist.darwin-8.4.0-Power_Macintosh/egg/dispatch/predicates.py(492)dispatch_by_truth() (Pdb) --Return-- > /Users/alberto/build/bdist.darwin-8.4.0-Power_Macintosh/egg/dispatch/predicates.py(492)dispatch_by_truth()->[0, None, <functio...x132b1f0>, None] (Pdb) --Call-- > /sw/lib/python2.4/site-packages/TurboJson-0.9.1-py2.4.egg/turbojson/jsonify.py(20)jsonify_simple() -> def jsonify_simple(obj): (Pdb) s > /sw/lib/python2.4/site-packages/TurboJson-0.9.1-py2.4.egg/turbojson/jsonify.py(21)jsonify_simple() -> return obj (Pdb) There you go, jsonify(2) actually is executed by jsonify_simple at line 21 of jsonify.py. Need anything more? I'm even sure you can inspect a function's AST dynamically but I have not yet found a way to do it... (Anyone got an idea? I'd really appreciate it... :)
Well, luckily for all think in different ways and have different approaches and biases to problems. And it'll be hell freezing boring :) Regards, Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~--- |
- [TurboGears] Re: Is Identity too much? I think so. Steve Bergman
- [TurboGears] Re: Is Identity too much? I think so. Jorge Godoy
- [TurboGears] Re: Is Identity too much? I think s... Steve Bergman
- [TurboGears] Re: Is Identity too much? I thi... Jorge Godoy
- [TurboGears] Re: Is Identity too much? I... jvanasco
- [TurboGears] Re: Is Identity too much? I... Jorge Godoy
- [TurboGears] Re: Is Identity too much? I... jvanasco
- [TurboGears] Re: Is Identity too much? I... Jeff Watkins
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde
- [TurboGears] Re: Is Identity too much? I... Jeff Watkins
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde
- [TurboGears] Re: Is Identity too much? I... Jorge Godoy
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde
- [TurboGears] Re: Is Identity too much? I... Jorge Godoy
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde
- [TurboGears] Re: Is Identity too much? I... Bob Ippolito
- [TurboGears] Re: Is Identity too much? I... BJörn Lindqvist
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde
- [TurboGears] Re: Is Identity too much? I... Jorge Godoy
- [TurboGears] Re: Is Identity too much? I... Alberto Valverde

