To count no. times a function is called?
<p>is there any method to count how many times a function is called in python?
I'm using checkbutton in GUI. I have written a function for that checkbutton command, i need to perform some actions based on the checkbutton status, i mean based on whether it is ticked or not. My checkbutton and button syntax are like this</p>

<pre><code>All = Checkbutton (text='All', command=Get_File_Name2,padx =48, justify = LEFT)
submit = Button (text='submit', command=execute_File,padx =48, justify = LEFT)
</code></pre>

<p>so i thougt of countin no. of times the command function is called, and based on its value i can decide whether it is ticked or not. please help</p>
