我正在使用烧瓶和 python 2.7 GAE SDK。我正在尝试在我的应用程序中包含一个交互式外壳。
我正在尝试在我的应用程序中包含以下交互式 python shell,以便我可以在开发时与 GAE API 交互 - http://code.google.com/p/google-app-engine-samples/source/browse/后备箱/外壳/
按照指示,我已将 static/ 和 templates/ 文件夹以及 shell.py 复制到我的应用程序的根目录。
我还仅将 url 路由添加到我的 app.yaml (shell)-
application: myflaskonappengineapp
version: 1
runtime: python27
api_version: 1
threadsafe: false
default_expiration: "5d"
builtins:
- appstats: on
- admin_redirect: on
- deferred: on
- remote_api: on
libraries:
- name: jinja2
version: "2.6"
- name: markupsafe
version: "0.15"
- name: lxml
version: "2.3"
- name: numpy
version: "1.6.1"
- name: PIL
version: "1.1.7"
- name: pycrypto
version: "2.3"
- name: setuptools
version: "0.6c11"
- name: webapp2
version: "2.3"
- name: webob
version: "1.1.1"
- name: yaml
version: "3.10"
inbound_services:
- warmup
handlers:
- url: /favicon.ico
static_files: application/static/img/favicon.ico
upload: application/static/img/favicon.ico
- url: /robots.txt
static_files: application/static/robots.txt
upload: application/static/robots.txt
- url: /_gae_mini_profiler/static
static_dir: packages/flaskext/gae_mini_profiler/static
- url: /static
static_dir: application/static
#interactive shell
- url: /shell
script: shell.py
- url: /remote_api
script: /opt/google_appengine/google/appengine/ext/remote_api/handler.py
- url: .*
script: application.app
但是,当我尝试访问 url /shell 时,出现 404 错误?我还需要为路由配置烧瓶吗?为什么烧瓶处理这个 url 而不是 shell.py?