dev_appserver.py打开文本文件,不部署 [英] dev_appserver.py Opens a Text File, Does Not Deploy

查看:78
本文介绍了dev_appserver.py打开文本文件,不部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它在另一台计算机上运行良好,但是设置了Google App Engine并创建了main.py和app.yaml文件后,我在Windows命令提示符下运行dev_appserver.py app.yaml,而不是将应用程序部署到localhost:8080上只是打开此文本文件,我将缩短它:

It works fine on my other computer, but after setting up Google App Engine and creating the main.py and app.yaml files, I run dev_appserver.py app.yaml in Windows command prompt and instead of deploying the app to localhost:8080 it just opens this text file, which I will shorten:

#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Convenience wrapper for starting an appengine tool."""

import os
import sys

sys_path = sys.path
try:
  sys.path = [os.path.dirname(__file__)] + sys.path

  import wrapper_util

finally:
  sys.path = sys_path

wrapper_util.reject_old_python_versions((2, 7))

_DIR_PATH = wrapper_util.get_dir_path(__file__, os.path.join('lib', 'ipaddr'))
_PATHS = wrapper_util.Paths(_DIR_PATH)

等等等

这是怎么回事?一切设置都与我的另一台PC相同.应该可以.

What is going on here? Everything is set up identically to my other pc. It should work.

推荐答案

已解决! .py文件都设置为用idle.bat打开,因此我不得不进入Control Panel\Programs\Default Programs\Set Associations,并将.py文件关联更改为python.exe.现在,一切都像魅力一样.

SOLVED! The .py files were all set to open with idle.bat so I had to go into Control Panel\Programs\Default Programs\Set Associations and change the .py file association to python.exe. Now everything works like a charm.

这篇关于dev_appserver.py打开文本文件,不部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆