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

All Samples(465)  |  Call(456)  |  Derive(0)  |  Import(9)
count(s, sub[, start[,end]]) -> int

Return the number of occurrences of substring sub in string
s[start:end].  Optional arguments start and end are
interpreted as in slice notation.

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

    Return the number of occurrences of substring sub in string
    s[start:end].  Optional arguments start and end are
    interpreted as in slice notation.

    """
    return s.count(*args)
        


src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Mac/Demo/example0/checktext.py   spike(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/s/p/spike-HEAD/vendor/stackless/current/Mac/Demo/example0/checktext.py   spike(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/s/p/spike-HEAD/vendor/Python/v2.5.1/Mac/Demo/example0/checktext.py   spike(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/s/p/spike-HEAD/vendor/Python/current/Mac/Demo/example0/checktext.py   spike(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/u/n/unladen-swallow-HEAD/Mac/Demo/example0/checktext.py   unladen-swallow(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/p/y/python2.6-HEAD/Mac/Demo/example0/checktext.py   python2.6(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/s/l/SlopPy-HEAD/Mac/Demo/example0/checktext.py   SlopPy(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/i/n/IncPy-HEAD/Mac/Demo/example0/checktext.py   IncPy(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/p/y/python2.6-cmake-HEAD/Mac/Demo/example0/checktext.py   python2.6-cmake(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

src/u/n/unixpiger-HEAD/trunk/monitor/api/python/Mac/Demo/example0/checktext.py   unixpiger(Download)
    if len(data) == 0:
        EasyDialogs.Message('File is empty.')
        sys.exit(0)
    number_cr = string.count(data, '\r')
    number_lf = string.count(data, '\n')
    if number_cr == number_lf == 0:
        EasyDialogs.Message('File contains no lines.')

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next