Skip to content

Instantly share code, notes, and snippets.

View rpsjr's full-sized avatar

Raimundo Pereira da Silva Junior rpsjr

View GitHub Profile
import inspect
""" var_dump('vars') module to dump variables (python 3.6+: uses f strings)"""
def var_dump(var_list_str):
""" print variables in callers scope indicated in space delimited string param"""
# retrieve information needed on callers frame
prev_frame = inspect.currentframe().f_back
frame_info = inspect.getframeinfo(prev_frame)
import inspect
""" var_dump('vars') module to dump variables (python 3.6+: uses f strings)"""
def var_dump(var_list_str):
""" print variables in callers scope indicated in space delimited string param"""
# retrieve information needed on callers frame
prev_frame = inspect.currentframe().f_back
frame_info = inspect.getframeinfo(prev_frame)