source: OpenRLabs-Git/deploy/rlabs-docker/web2py-rlabs/gluon/settings.py

main
Last change on this file was 42bd667, checked in by David Fuertes <dfuertes@…>, 4 years ago

Historial Limpio

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3"""
4| This file is part of the web2py Web Framework
5| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
6| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
7"""
8
9import os
10import sys
11import platform
12from gluon.storage import Storage
13from gluon._compat import PY2
14
15global_settings = Storage()
16settings = global_settings  # legacy compatibility
17
18if not hasattr(os, 'mkdir'):
19    global_settings.db_sessions = True
20
21if global_settings.db_sessions is not True:
22    global_settings.db_sessions = set()
23
24global_settings.gluon_parent = \
25    os.environ.get('web2py_path', os.getcwd())
26
27global_settings.applications_parent = global_settings.gluon_parent
28
29global_settings.app_folders = set()
30
31global_settings.debugging = False
32
33global_settings.is_pypy = \
34    hasattr(platform, 'python_implementation') and \
35    platform.python_implementation() == 'PyPy'
36
37global_settings.is_jython = \
38    'java' in sys.platform.lower() or \
39    hasattr(sys, 'JYTHON_JAR') or \
40    str(sys.copyright).find('Jython') > 0
41
42global_settings.is_source = os.path.exists(os.path.join(
43        global_settings.gluon_parent, 'web2py.py'))
44
45global_settings.is_py2 = PY2
Note: See TracBrowser for help on using the repository browser.