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)
etc. etc.
What is going on here? Everything is set up identically to my other pc. It should work.
you should supply project directory to dev_appserver.py not app.yaml. please refer to GAE python hello world example for more info. let's say your project-Dir is
and your dev_appserver.py is at
. then just run:
this should work.
SOLVED! The
.py
files were all set to open withidle.bat
so I had to go intoControl Panel\Programs\Default Programs\Set Associations
and change the.py
file association topython.exe
. Now everything works like a charm.Is Python installed on this computer? What you're seeing is that Windows doesn't know that ".py" files are associated with Python.
Installing SetupTools on 64-bit Windows might provide some helpful info.