Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

get current function name in python3

import inspect
def myfirstfunc():
    print(inspect.currentframe().f_code.co_name)
    # OR
    print(inspect.stack()[0][3])
myfirstfunc()
Comment

PREVIOUS NEXT
Code Example
Python :: lagrange polynomial python code 
Python :: pip not downlaoding cryptography wheel macos 
Python :: connect snowflake with python 
Python :: Make Rotation matrix in Python 
Python :: opencv convert black pixels to white 
Python :: extract all text from website using beautifulsoup and python 
Python :: selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: 
Python :: read data from s3 bucket python 
Python :: python sum of list axes 
Python :: python how to find circle circumference 
Python :: how to get a dictionary in alphabetical order python 
Python :: how to use random tree in python 
Python :: python terminal game 
Python :: pandas add value to excel column and save 
Python :: pandas df to dict 
Python :: merge two columns pandas 
Python :: remove prefix from string python 
Python :: pd df sample 
Python :: selenium chrome options suppress warnings python 
Python :: python convert json string to class 
Python :: Get current cursor type and color Tkinter Python 
Python :: count nan values 
Python :: get local ip 
Python :: add new row to dataframe pandas 
Python :: numpy diff 
Python :: pyodbc cursor create list of dictionaries 
Python :: find max length of list of list python 
Python :: play video in python console 
Python :: select python 
Python :: Code of recursive binary search 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =