Understanding python import



I think this is the best article that helps to import sub-directory as module,

https://timothybramlett.com/How_to_create_a_Python_Package_with___init__py.html

The only thing i wanted to say is, if you use

__all__ = ['mymodule1', 'mymodule2']

That's to accomodate syntax such as this

from sub-directory import *

See the magically asterisk there...... all this is for this little baby. :)





Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm