如何为Google App Engine创建.py文件? [英] How to create a .py file for Google App Engine?

查看:142
本文介绍了如何为Google App Engine创建.py文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是刚开始的时候,我认为这将是探索 Google App Engine ,使用 Python

我刚刚下载了 Python 2.6.4 from Python官方网站并将其安装在我的电脑上(我正在使用Windows XP)。我还下载了 App Engine Python软件开发工具包(SDK)(来自< a href =http://code.google.com/appengine/downloads.html =nofollow noreferrer>本页)并安装它。这两个步骤都在 Google App Engine的Getting-入门指南

但是,当我转到第三页,标题为你好,世界!,我遇到了一种并发症。它写在那里:
$ b


创建一个名为helloworld的目录。
此应用程序的所有文件都驻留在
中在
helloworld目录中,创建一个名为helloworld.py的文件
,并给它
后面的内容......


我在这里感到困惑:我如何创建一个.py文件?是否需要创建一个记事本文件(.txt)并将其命名为helloworld.py(当我这样做时,它不会更改为任何不同的任何不同文件,而是保留一个普通的.txt文件)或应该我以某种方式使用我已安装的Google App Engine启动器创建该文件?

解决方案

您需要比记事本更好的编辑器。使用记事本,使用另存为...,然后在对话框中输入helloworld.py,包括引号,以便文件扩展名为.py而不是.txt


I am just at the very start of what I think is gonna be a long journey exploring the world of applications in Google App Engine using Python.

I have just downloaded Python 2.6.4 from the Python official website and installed it on my computer (I am using Windows XP). I also downloaded the App Engine Python software development kit (SDK) (from this page) and installed it, too. Both of these steps were suggested on the second page of Google App Engine's Getting-Started Guide.

However, when I moved on to the third page, which is titled as "Hello, World!", I ran into a sort of complication. It is written there:

"Create a directory named helloworld. All files for this application reside in this directory. Inside the helloworld directory, create a file named helloworld.py, and give it the following contents..."

I am kind of puzzled here: How do I create a .py file? Is it like I need to create a notepad file (.txt) and name it helloworld.py (when I did so, it didn't change into any different file of any different, but rather stayed an ordinary .txt file) or should I somehow create that file using Google App Engine Launcher that I have installed?

解决方案

You will need a better editor than Notepad. With Notepad, use Save As..., and type "helloworld.py" in the dialog, including quotes so that the file extension is .py instead of .txt

这篇关于如何为Google App Engine创建.py文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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