Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Python: Structuring a project with utility functions shared across modules at different levels

Current License: CC BY-SA 4.0

8 events
when toggle format what by license comment
Apr 2, 2022 at 5:40 vote accept GoldenJoe
Mar 29, 2022 at 4:05 answer added Amadan timeline score: 2
Mar 28, 2022 at 19:45 comment added GoldenJoe Straight from VSCode, I assume it just executes the script directly.
Mar 28, 2022 at 18:03 comment added Amadan It doesn't matter. I am saying that that would have worked, if that was what you were doing - so I know that is not what you were doing. The question remains: how are you running whatever scripts you are running, and from which directory? Without that answer, it is not really possible to help you, except to retell you what the docs already explain about how imports work.
Mar 28, 2022 at 11:47 comment added GoldenJoe I’m not trying to run sl_networking.py at all. I want to run scripts in the tests folder.
Mar 28, 2022 at 3:55 answer added Lemon Reddy timeline score: 0
Mar 28, 2022 at 3:46 comment added Amadan How, and from which directory, are you running your code? Executing python -m libs.scrapers.sl.sl_networking from TradeAssist directory should not generate this error. (Also, relative imports are commonly used between files with closely related functionality; for this, you might want to use absolute module path, as three levels up is not that obviously related and is less readable — I had to count off levels while head-parsing your command)
Mar 28, 2022 at 3:40 history asked GoldenJoe CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /