Nik
Nik

Reputation: 7273

Python Import Question

I have a custom package and I am having import problems. The module structure is like this:

- BaseModule
    - Exchange
    - Communications
        - DeviceComm

I am trying to import the Exchange module into the DeviceComm module. How do I do that?

Upvotes: 1

Views: 209

Answers (1)

phihag
phihag

Reputation: 287755

Use Intra-package references:

from .. import Exchange

Upvotes: 1

Related Questions