模块没有子模块

2024-06-02 06:42:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在做一个烧瓶网络应用程序,我有一些我不明白的东西。在

我的app模块文件夹结构如下:

app\
  | static\
  | templates\
  | tmp\
  | __init__.py
  | run.py <= debug script
  | toolxls.py <= helper functions 
  | views.py

在myinit.py中:

^{pr2}$

现在,如果我从空闲导入应用程序模块:

>>> import app
>>> dir(app)
['Flask', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'app', 'views']

模块app没有toolxls子模块。我该怎么加工具.xlpy进入app?在


Tags: 模块runpy程序文件夹app烧瓶init