Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / common / extensions / docs / server2 / environment.py
blob7433be3ad29b639a5b0257d92e9f831550e509cc
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import os
6 import sys
9 def _IsServerSoftware(name):
10 return os.environ.get('SERVER_SOFTWARE', '').find(name) == 0
13 def IsDevServer():
14 return _IsServerSoftware('Development')
17 def IsReleaseServer():
18 return _IsServerSoftware('Google App Engine')
21 def IsPreviewServer():
22 return sys.argv and os.path.basename(sys.argv[0]) == 'preview.py'