#!/usr/bin/env python #### foo/mod.py import os, inspect os.chdir('bar') def call(): print inspect.stack() call()