I can get the path of 'os.py' like this:
import os
os.__file__
But how can I get it without importing it? I found this relevant question, but none of these work for Python3.11 , although they work for Python<=3.10 .
It seems that the newly introduced Python3.11 optimizations (doc) broke these solutions.