Importing a module dynamically using imp

前端 未结 2 524
谎友^
谎友^ 2020-12-09 03:56

I am trying to import a module from a different directory dynamically. I am following an answer from this question. I have a module named bar in a directory named foo. The m

2条回答
  •  清歌不尽
    2020-12-09 04:26

    Appears to be a simple pathing problem - check __file__ or cwd... Maybe try an absolute file path first? - This imp example may help.

提交回复
热议问题