Dump function variables to workspace in python/ipython

前端 未结 5 977
闹比i
闹比i 2021-01-14 10:06

When developing and debugging with python/ipython repl, at some point I\'d like to dump all the local variables in a function to the workspace to see what\'s going on. Suppo

5条回答
  •  孤街浪徒
    2021-01-14 10:34

    You have a function for this:

    print locals()
    

    and globals() for global variables

提交回复
热议问题