so I'm trying to wrap some functionality around execfile but don't want to modify the way it works. specifically when you call execfile, it automatically grabs globals and locals from the frame the execfile exists in.
so if I wrap execfile in a function, I need a way to reliably get at the calling frame. what I want to know is - is it *ALWAYS* true that: inspect.getouterframes( inspect.currentframe() )[ 1 ][ 0 ] will return me the frame that called execfile in the first place? I can't think of a way that this wouldn't be the case, but I'm not 100% sure that assertion is valid.
-- http://mail.python.org/mailman/listinfo/python-list