Created
October 14, 2015 19:05
-
-
Save nedbat/2a73a9d1d12ce13e59da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open("/tmp/foo.txt", "a") as f: | |
print >>f, "-----", __name__ | |
import inspect;print >>f, ("\n".join("%30s : %s @%d" % (t[3], t[1], t[2]) for t in inspect.stack()[:0:-1])) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment