[Python-Dev] Loading modules from a folder

Mani Sarkar sadhak001 at gmail.com
Thu Mar 7 12:24:48 EST 2019


I have seen multiple ways to load modules from a folder.

Say I have a folder src which contains a number of folders each one of them
is a module.

What are the conventional ways to load modules from such a folder?

I have used

>From src.[module] import xxxxx

But I don't want to use the src prefix, any other ways to indicate that in



@theNeomatrix369 <http://twitter.com/theNeomatrix369>*  |  **Blog
<http://neomatrix369.wordpress.com/>**  | *@adoptopenjdk
<http://twitter.com/adoptopenjdk> @graalvm <http://twitter.com/graalvm>
@graal <http://twitter.com/graal> @truffleruby
<http://twitter.com/truffleruby> | Dev. communities | *Bitbucket
<https://bitbucket.org/neomatrix369>* * |  **Github
<https://github.com/neomatrix369>* * | * *Slideshare
<https://slideshare.net/neomatrix369>* * | **LinkedIn
*Come to Devoxx UK 2019:* http://www.devoxx.co.uk/

*Don't chase success, rather aim for "Excellence", and success will come
chasing after you!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190307/82a35790/attachment.html>

More information about the Python-Dev mailing list