+ 2
Is there a way to read the code of modules and functions written by others people?
I would like to know if exists a way to read the modules and functions code written by others so to have the possibility to modify it and use what you need in a wide-DRY way.
3 Réponses
+ 3
Obviously you can! Most, if not all, of the modules are available on github or may be other similar platforms where you can see and understand, even, can modify and use. Or if you've it already installed, just import the module in the interpreter and look for its location using module_name.__file__
For most of the cases they'll be in a directory named site-packages where you can obviously modify it but be careful 'cause you may break the code and thus may need to remove and reinstall that module but in any case, yes you can modify it and use.
+ 2
Luca you're welcome and happy pythoning!
+ 1
Really? Gorgeous! Thank you very much! So for each function or module i can read the code and modify it using the technic you told me? I'm just new in Python i'm studying the foundamentals but i think this is the top! Python n.1. I hope in the future, when i will have done kore experience with Python to modify everything i need to adapt to my necessity.
Thanks with my heart! 😊