!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/pyshared/epsilon/   drwxr-xr-x
Free 130.05 GB of 142.11 GB (91.51%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     caseless.py (3.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# -*- test-case-name: epsilon.test.test_caseless -*-
"""
Helpers for case-insensitive string handling.
"""

class Caseless(object):
    """
    Case-insensitive string wrapper type.
    
    This wrapper is intended for use with strings that have case-insensitive
    semantics, such as HTTP/MIME header values.  It implements comparison-based
    operations case-insensitively, avoiding the need to manually call C{lower}
    where appropriate, or keep track of which strings are case-insensitive
    throughout various function calls.

    Example usage:

        >>> Caseless('Spam') == Caseless('spam')
        True
        >>> 'spam' in Caseless('Eggs and Spam')
        True

        >>> sorted(['FOO', 'bar'], key=Caseless)
        ['bar', 'FOO']

        >>> d = {Caseless('Content-type'): Caseless('Text/Plain')}
        >>> d[Caseless('Content-Type')].startswith('text/')
        True

    Note:  String methods that return modified strings (such as
    C{decode}/C{encode}, C{join}, C{partition}, C{replace}, C{strip}/C{split})
    don't have an unambiguous return types with regards to case sensitivity, so
    they are not implemented by L{Caseless}.  They should be accessed on the
    underlying cased string instead.  (Excepted are methods like
    C{lower}/C{upper}, whose return case is unambiguous.)

    @ivar cased:  the wrapped string-like object
    """

    def __init__(self, cased):
        if isinstance(cased, Caseless):
            cased = cased.cased
        self.cased = cased


    def __repr__(self):
        return '%s(%r)' % (type(self).__name__, self.cased)


    # Methods delegated to cased

    def __str__(self):
        return str(self.cased)


    def __unicode__(self):
        return unicode(self.cased)


    def __len__(self):
        return len(self.cased)


    def __getitem__(self, key):
        return self.cased[key]


    def __iter__(self):
        return iter(self.cased)


    def lower(self):
        return self.cased.lower()


    def upper(self):
        return self.cased.upper()


    def title(self):
        return self.cased.title()


    def swapcase(self):
        return self.cased.swapcase()


    # Methods delegated to lower()

    def __cmp__(self, other):
        return cmp(self.lower(), other.lower())


    def __hash__(self):
        return hash(self.lower())


    def __contains__(self, substring):
        return substring.lower() in self.lower()


    def startswith(self, prefix, *rest):
        if isinstance(prefix, tuple):
            lprefix = tuple(s.lower() for s in prefix)
        else:
            lprefix = prefix.lower()
        return self.lower().startswith(lprefix, *rest)


    def endswith(self, suffix, *rest):
        if isinstance(suffix, tuple):
            lsuffix = tuple(s.lower() for s in suffix)
        else:
            lsuffix = suffix.lower()
        return self.lower().endswith(lsuffix, *rest)


    def count(self, substring, *rest):
        return self.lower().count(substring.lower(), *rest)


    def find(self, substring, *rest):
        return self.lower().find(substring.lower(), *rest)


    def index(self, substring, *rest):
        return self.lower().index(substring.lower(), *rest)


    def rfind(self, substring, *rest):
        return self.lower().rfind(substring.lower(), *rest)


    def rindex(self, substring, *rest):
        return self.lower().rindex(substring.lower(), *rest)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0107 ]--