Is it possible to import a python file from outside the directory the main file is in?

前端 未结 1 1417
没有蜡笔的小新
没有蜡笔的小新 2021-01-20 19:47

I have a file structure that looks like this:

Liquid
|
[Truncate]
|_General_parsing
[Truncate]
.....|_\'__init__.py\'
.....|_\'Processer.py\'
.....|\'TOKENIZE         


        
相关标签:
1条回答
  • 2021-01-20 20:19

    I solved it! I have to add .. to sys.path instead

    0 讨论(0)
提交回复
热议问题