0

What is the difference between doing:

from utils import *

And:

from .utils import *

Are these one and the same thing, or do they actually address something different? When should one be used over the other?

David542
  • 104,438
  • 178
  • 489
  • 842
  • 1
    Does this answer your question? [What does a . in an import statement in Python mean?](https://stackoverflow.com/questions/7279810/what-does-a-in-an-import-statement-in-python-mean) – wjandrea Dec 03 '19 at 00:01
  • @wjandrea sort of...looking at the docs [here](http://www.python.org/dev/peps/pep-0328/) makes it even more confusing for me. – David542 Dec 03 '19 at 00:02
  • The docs here might be clearer (haven't read them myself): [Packages](https://docs.python.org/3/tutorial/modules.html#packages) > [Intra-package References](https://docs.python.org/3/tutorial/modules.html#intra-package-references) – wjandrea Dec 03 '19 at 00:17

0 Answers0