Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Module grabber
-
I was curious as to what some of the modules (as in,
import {module}
) actually look like. So I made this script to pull them from the app's site-packages folder.https://gist.github.com/79be00ce58370583b65f
I'm sure it can be improved – all I ask is that you let me know so I can get the better version! :p
-
You might want to have a look at the
inspect
module, particularly thegetsource
function. -
I made something similar a while ago, it looks up and opens the path for a given module name.
Bonus feature: if you have text selected that looks like a module name or import statement, that module is looked up directly without asking for a name.
-
Thanks for the suggestions! I've implemented the inspect module and am working on something similer to the importfinder script.
-
Thanks for the useful tool. Python is still relatively new to me and whenever learning a new language it always helps to spend as much time as possbile reading existing code. The Python standard library modules are ideal sources (pun intended) for code to study.