在我的系统上设置 py.saunter 时,我收到 saunter.ini 文件的 IO 错误。
目录结构完全如示例中所示 - https://github.com/Element-34/Py.Saunter-Examples
以下是错误消息 -
IOError: [Errno 2] No such file or directory: '/src/conf/saunter.ini'
ERROR: Module: Tests could not be imported
(file:/Users/.../PythonWorkspace/PySaunter/src/scripts/Tests.py)
我知道有很多与进口相关的问题。他们中的大多数人建议添加init .py 如果还没有的话。我在每个文件夹中添加了init .py。
读取 saunter.ini 的代码片段如下 -
def configure(self, config = "saunter.ini"):
self.config = ConfigParser.SafeConfigParser()
self.config.readfp(open(os.path.join("conf", config)))
任何帮助,将不胜感激...