Importing module from another subdirectory

Rich Shepard rshepard at appl-ecosys.com
Thu Apr 18 09:05:41 EDT 2019


On Thu, 18 Apr 2019, dieter wrote:

> Python knows about 2 kinds of "regular" imports: absolute ones and
> relative ones. "Absolute" imports are guided by "sys.path" -- in the
> simple case, a sequence of folders containing modules and/or pacakges.
> Relative imports are guided in a similar way by the current packages's
> "__path__", which typically contains just one element - the folder from
> which the current package was loaded.

Dieter,

Thanks. My previous applications used a single directory rather than
separating the model, views, and controller so now I know what to learn to
resolve this issue.

Regards,

Rich


More information about the Python-list mailing list