Is it possible to display a list of all user functions in the IDLE session?
I can see them popping up in the autocomplete, so maybe there is other way to just display only the user functions defined for the session. It is useful when you forget the name of the function. And also when you want to make sure that you don't lose source code for a function when a session is closed.
This should give you a list of all functions in the global scope:
import types
print([f for f in globals().values() if type(f) == types.FunctionType])
This should work:
print([f for f in dir() if f[0] is not '_'])
Tested on version 3.5.2
.
dir()
will essentially give you a list of callable objects within the current scope.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With