lib.py: add currentframe function for display frame info.