Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 谷歌AppEngine应用程序版本_Python_Google App Engine - Fatal编程技术网

Python 谷歌AppEngine应用程序版本

Python 谷歌AppEngine应用程序版本,python,google-app-engine,Python,Google App Engine,是否有可能以编程方式获取当前应用程序版本,以便在具有far future expires标头的URL中使用 例如: <link rel="stylesheet" href="app.js?v=1.23" /> 应自动更新为: <link rel="stylesheet" href="app.js?v=1.24" /> 为此,我需要从中获取版本。[ 从google.appengine.ext导入webapp 导入操作系统 类PrintEnvironmentHan

是否有可能以编程方式获取当前应用程序版本,以便在具有far future expires标头的URL中使用

例如:

<link rel="stylesheet" href="app.js?v=1.23" />

应自动更新为:

<link rel="stylesheet" href="app.js?v=1.24" />

为此,我需要从中获取版本。

[

从google.appengine.ext导入webapp
导入操作系统
类PrintEnvironmentHandler(webapp.RequestHandler):
def get(自我):
对于os.environ.keys()中的名称:
self.response.out.write(“%s=%s
\n”%(名称,os.environ[name])) [1]: http://code.google.com/appengine/docs/python/theenvironment.html
谢谢!我在appengine网站上到处找,不知什么原因找不到。
from google.appengine.ext import webapp
import os

class PrintEnvironmentHandler(webapp.RequestHandler):
  def get(self):
    for name in os.environ.keys():
      self.response.out.write("%s = %s<br />\n" % (name, os.environ[name]))


  [1]: http://code.google.com/appengine/docs/python/theenvironment.html