• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(632)  |  Call(595)  |  Derive(0)  |  Import(37)
rfind(s, sub [,start [,end]]) -> int

Return the highest index in s where substring sub is found,
such that sub is contained within s[start,end].  Optional
arguments start and end are interpreted as in slice notation.

Return -1 on failure.

        def rfind(s, *args):
    """rfind(s, sub [,start [,end]]) -> int

    Return the highest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.

    Return -1 on failure.

    """
    return s.rfind(*args)
        


src/n/o/notabene-HEAD/trunk/lib/FuXi/Rete/notation3.py   notabene(Download)
# from uripath import refTo, join
# import uripath
 
from string import find, rfind, index
 
def splitFrag(uriref):
    """split a URI reference between the fragment and the rest.
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    while 1:
        if path[:2] == './':
            path = path[2:]
        if path == '.':
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)
#                return "<"+x+">"
 
 
        j = string.rfind(value, "#")
        if j<0 and "/" in self._flags:
            j=string.rfind(value, "/")   # Allow "/" namespaces as a second best
 
    def symbolString(self, value):
        j = string.rfind(value, "#")
        if j<0 and "/" in self._flags:
            j=string.rfind(value, "/")   # Allow "/" namespaces as a second best
 
        if (j>=0
            and "p" not in self._flags):   # Suppress use of prefixes?

src/n/o/notabene-HEAD/lib/FuXi/Rete/notation3.py   notabene(Download)
# from uripath import refTo, join
# import uripath
 
from string import find, rfind, index
 
def splitFrag(uriref):
    """split a URI reference between the fragment and the rest.
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    while 1:
        if path[:2] == './':
            path = path[2:]
        if path == '.':
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)
#                return "<"+x+">"
 
 
        j = string.rfind(value, "#")
        if j<0 and "/" in self._flags:
            j=string.rfind(value, "/")   # Allow "/" namespaces as a second best
 
    def symbolString(self, value):
        j = string.rfind(value, "#")
        if j<0 and "/" in self._flags:
            j=string.rfind(value, "/")   # Allow "/" namespaces as a second best
 
        if (j>=0
            and "p" not in self._flags):   # Suppress use of prefixes?

src/z/a/zamboni-lib-HEAD/lib/python/rdflib/plugins/parsers/notation3.py   zamboni-lib(Download)
import time
import StringIO
 
from string import find, rfind
from decimal import Decimal
 
from rdflib.term import URIRef, BNode, Literal, Variable, _XSD_PFX
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    while 1:
        if path[:2] == './':
            path = path[2:]
        if path == '.':
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)

src/n/o/notabene-HEAD/trunk/lib/rdflib/syntax/parsers/n3p/uripath.py   notabene(Download)
 
__version__ = "$Id: uripath.py,v 1.16 2004/03/21 04:24:35 timbl Exp $"
 
from string import find, rfind, index
 
 
def splitFrag(uriref):
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    path, frag = splitFragP(there)
    if not path: return here + frag
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)
            if i >= 0:
                here = here[:i+1]
                slashr = i

src/r/d/rdflib-HEAD/rdflib/syntax/parsers/notation3.py   rdflib(Download)
import time
import StringIO
 
from string import find, rfind
from decimal import Decimal
 
from rdflib.term import URIRef, BNode, Literal, Variable
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    while 1:
        if path[:2] == './':
            path = path[2:]
        if path == '.':
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)

src/r/d/rdflib-3.0.0/rdflib/plugins/parsers/notation3.py   rdflib(Download)
import time
import StringIO
 
from string import find, rfind
from decimal import Decimal
 
from rdflib.term import URIRef, BNode, Literal, Variable, _XSD_PFX
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    while 1:
        if path[:2] == './':
            path = path[2:]
        if path == '.':
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)

src/r/d/rdf.plugins.parsers.n3p-0.9a1/n3p/uripath.py   rdf.plugins.parsers.n3p(Download)
 
__version__ = "$Id: uripath.py,v 1.16 2004/03/21 04:24:35 timbl Exp $"
 
from string import find, rfind, index
 
 
def splitFrag(uriref):
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i+1:]
    else: return uriref, None
 
 
    """
 
    i = rfind(uriref, "#")
    if i>= 0: return uriref[:i], uriref[i:]
    else: return uriref, ''
 
    if there[:1] == '/':
        return here[:bpath] + there
 
    slashr = rfind(here, '/')
 
    path, frag = splitFragP(there)
    if not path: return here + frag
            path = ''
        elif path[:3] == '../' or path == '..':
            path = path[3:]
            i = rfind(here, '/', bpath, slashr)
            if i >= 0:
                here = here[:i+1]
                slashr = i

src/m/y/mysql-python-HEAD/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py   mysql-python(Download)
from zLOG import LOG, ERROR, INFO
 
import string, sys
from string import strip, split, find, upper, rfind
from time import time
 
key_types = {
            field_default = Default and "DEFAULT %s"%Default or ''
            if Default: info['Default'] = Default
            if '(' in Type:
                end = rfind(Type,')')
                short_type, size = split(Type[:end],'(',1)
                if short_type not in ('set','enum'):
                    if ',' in size:

src/d/o/dominic-HEAD/dominic/yapps2/yappsrt.py   dominic(Download)
# Yapps 2.0 Runtime
#
# This module is needed to run generated parsers.
 
from string import join, count, find, rfind
import re
 
    p = p - max(p-80, 0)
 
    # Strip to the left
    i = rfind(text[:p], '\n')
    j = rfind(text[:p], '\r')
    if i < 0 or (0 <= j < i): i = j
    if 0 <= i < p:

src/d/o/dominic-HEAD/dominic/xpath/yappsrt.py   dominic(Download)
# Yapps 2.0 Runtime
#
# This module is needed to run generated parsers.
 
from string import join, count, find, rfind
import re
 
    p = p - max(p-80, 0)
 
    # Strip to the left
    i = rfind(text[:p], '\n')
    j = rfind(text[:p], '\r')
    if i < 0 or (0 <= j < i): i = j
    if 0 <= i < p:

  1 | 2 | 3 | 4  Next