You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we can actually import module files from a full python path. Since here() will return a full path, we can write a function that makes it easier to import.
I don't want to name the function import, but something like:
importpyprojroot# will append `src` to the import path (temporarily)pyprojroot. proj_import(here("./src"))`
importmy_module1importmy_module2# will import module directly, given a .py scriptpyprojroot. proj_import(here("./src/my_module.py"))`
The text was updated successfully, but these errors were encountered:
From here: https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path
we can actually import module files from a full python path. Since
here()
will return a full path, we can write a function that makes it easier to import.I don't want to name the function
import
, but something like:The text was updated successfully, but these errors were encountered: