Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64
User : palandch ( 1163)
PHP Version : 7.1.33
Disable Function : NONE
Directory :  /opt/alt/python27/lib/python2.7/site-packages/beaker/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python27/lib/python2.7/site-packages/beaker/converters.py
try:
    from paste.util.converters import asbool, aslist
except ImportError:
    # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
    # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
    def asbool(obj):
        if isinstance(obj, (str, unicode)):
            obj = obj.strip().lower()
            if obj in ['true', 'yes', 'on', 'y', 't', '1']:
                return True
            elif obj in ['false', 'no', 'off', 'n', 'f', '0']:
                return False
            else:
                raise ValueError(
                    "String is not true/false: %r" % obj)
        return bool(obj)

    def aslist(obj, sep=None, strip=True):
        if isinstance(obj, (str, unicode)):
            lst = obj.split(sep)
            if strip:
                lst = [v.strip() for v in lst]
            return lst
        elif isinstance(obj, (list, tuple)):
            return obj
        elif obj is None:
            return []
        else:
            return [obj]

Spamworldpro Mini