[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: Importing module from another subdirectory
From: Rich Shepard <rshepard () appl-ecosys ! com>
Date: 2019-04-25 12:37:05
Message-ID: alpine.LNX.2.20.1904250533450.5499 () salmo ! appl-ecosys ! com
[Download RAW message or body]
On Thu, 25 Apr 2019, dieter wrote:
> The means that "test_act_de.py" has not extended "sys.path"
> appropriately.
Dieter,
That's what I thought.
> When Python starts a script ("gui/test_act_de.py" in your case), it
> automatically extends "sys.path" with the folder containing the script
> ("gui" in your case).
This is what I expected based on what I read, and ...
> If Python needs to find modules elsewhere, you must extend "sys.path" to
> tell it where it should look.
this is what I missed in my reading. I'll explicitly extend sys.path when
it's not done automatically.
I've taken your suggestion of developing each project in its own virtual
environment and I think that explicitly appending imported packages will
resolve all these issues.
Many thanks,
Rich
--
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic