You can get the list of module search paths. Find the directory you’d like from the list.
>python
Python 3.8.6
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
---The list of module search paths---
Appendix
You can find the directory where python.exe is by using “where” command.
I could neither open nor edit a post in WordPress. The error “Uncaught (in promise) TypeError: Cannot read property ‘replace’ of undefined” occurred.
Problem
I created a post with “Enlighter Sourcecode” block by using Enlighter plugin and save the post. When I opened the saved post, the error “Uncaught (in promise) TypeError: Cannot read property ‘replace’ of undefined” occurred and nothing was displayed.
The filter hooks are defined by apply_filters() and add function to the filter hook by add_filter(). And the action hools are defined by do_action() and add action to the action hook by add_action().
The following is the outline diagram of apply_filters, do_action, add_action and add_filter.
Example
For example, this is one of the apply_filters functions in post-template.php.
Action is used to do some user-defined action, but on the other hands filter is used to rewrite or return the variable. So the function added by add_filter() has always return value.