我只是有点难以理解为什么这个命令:
>appcfg.py -A adept-box-109804 update app.yaml
正如“立即尝试 Google App Engine”页面所给出的那样,该页面不起作用。我已经下载了适用于 Python 的 App Engine SDK,并将 Path 设置为指向 appcfg.py 的位置,但在项目根目录中运行 appcfg.py 在命令行中不起作用。我要么必须导航到包含 appcfg.py 的文件夹,然后执行
>python appcfg.py help
or do
>python "C:\Program Files (x86)\Google\google_appengine\appcfg.py" help
获得在任何地方工作的命令。我使用后一种方法来部署我的测试应用程序,但只是想知道是否有人可以解释为什么简单的 Google 教程给出的命令没有执行任何操作。我还检查以确保 .py 文件自动使用 Python 2.7 解释器打开,这样只需键入以下命令即可在命令行中执行文件 hello.py
>hello.py
它会输出它的打印语句。另一方面,以类似的方式使用 appcfg.py 会给出相同的输出,无论参数如何(请注意,我截断了输出,但请放心,无论参数如何,它们都是相同的:
C:\>appcfg.py help backends
Usage: appcfg.py [options] <action>
Action must be one of:
backends: Perform a backend action.
backends configure: Reconfigure a backend without stopping it.
backends delete: Delete a backend.
backends list: List all backends configured for the app.
backends rollback: Roll back an update of a backend.
backends start: Start a backend.
backends stop: Stop a backend.
backends update: Update one or more backends.
create_bulkloader_config: Create a bulkloader.yaml from a running application.
cron_info: Display information about cron jobs.
delete_version: Delete the specified version for an app.
download_app: Download a previously-uploaded app.
download_data: Download entities from datastore.
help: Print help for a specific action.
list_versions: List all uploaded versions for an app.
request_logs: Write request logs in Apache common log format.
resource_limits_info: Get the resource limits.
rollback: Rollback an in-progress update.
set_default_version: Set the default (serving) version.
start_module_version: Start a module version.
stop_module_version: Stop a module version.
update: Create or update an app version.
update_cron: Update application cron definitions.
update_dispatch: Update application dispatch definitions.
update_dos: Update application dos definitions.
update_indexes: Update application indexes.
update_queues: Update application task queue definitions.
upload_data: Upload data records to datastore.
vacuum_indexes: Delete unused indexes from application.
Use 'help <action>' for a detailed description.
C:\>appcfg.py help update
Usage: appcfg.py [options] <action>
Action must be one of:
backends: Perform a backend action.
backends configure: Reconfigure a backend without stopping it.
backends delete: Delete a backend.
backends list: List all backends configured for the app.
backends rollback: Roll back an update of a backend.
backends start: Start a backend.
backends stop: Stop a backend.
backends update: Update one or more backends.
create_bulkloader_config: Create a bulkloader.yaml from a running application.
cron_info: Display information about cron jobs.
delete_version: Delete the specified version for an app.
download_app: Download a previously-uploaded app.
download_data: Download entities from datastore.
help: Print help for a specific action.
list_versions: List all uploaded versions for an app.
request_logs: Write request logs in Apache common log format.
resource_limits_info: Get the resource limits.
rollback: Rollback an in-progress update.
set_default_version: Set the default (serving) version.
start_module_version: Start a module version.
stop_module_version: Stop a module version.
update: Create or update an app version.
update_cron: Update application cron definitions.
update_dispatch: Update application dispatch definitions.
update_dos: Update application dos definitions.
update_indexes: Update application indexes.
update_queues: Update application task queue definitions.
upload_data: Upload data records to datastore.
vacuum_indexes: Delete unused indexes from application.
Use 'help <action>' for a detailed description.
我终于找到了真正的原因,这不是AppEngine SDK的错误。相反,这是我的 Python 解释器,因为我注意到它不接受任何 .py 文件的参数。结果发现是一个注册表错误,位于[HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command]
我必须从哪里改变价值"C:\Python27\python.exe" "%1"
to "C:\Python27\python.exe" "%1" %*
这是如何发生的,无论是 Python 2.7 安装程序,还是 AppEngine SDK,我都不确定。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)