sys.meta_path is one of the best-kept secrets in the Python standard library, despite being squarely located in a module every Python programmer is...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Kermit, super interesting. I didn't know about sys.meta_path - seems also very handy to develop plugin systems like you did! Great for a big customizable app
A small suggestion: if you re-edit your post you can add syntax highlighting with tags like this:
You just need to add
python
at the end of the three beginning ticks, like this:Ah, appreciate the tip on syntax highlighting! I've updated the article accordingly.
Interesting post! Thanks.
Have you tried seeing how static type checking behaves with this meta_path trick? Or would IDEs complain that the myapp.virtual.foo module does not exist?