Did I find the right examples for you? yes no

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)

        def truncate(s, limit=30):
    limit += 1
    if len(s) > limit:
        s = s[:limit]
        for i in xrange(len(s), 0, -1):
            if s[i-1] == ' ':
                return s.rstrip() + '...'
            s = s[:-1]
    return s
        


src/f/u/funkload-1.16.1/src/funkload/Recorder.py   funkload(Download)
from cgi import FieldStorage
from urlparse import urlsplit
from utils import truncate, trace, get_version, Data
 
def get_null_file():
                request.method.lower(),  request.rurl.strip()))
        description = "%s %s" % (request.method.capitalize(),
                                 request.path | truncate(42))
        if request.body:
            params = request.extractParam()

src/f/u/FunkLoad-HEAD/src/funkload/Recorder.py   FunkLoad(Download)
from cgi import FieldStorage
from urlparse import urlsplit
from utils import truncate, trace, get_version, Data
 
 
                request.method.lower(),  request.rurl.strip()))
        description = "%s %s" % (request.method.capitalize(),
                                 request.path | truncate(42))
        if request.body:
            params = request.extractParam()

src/x/m/xmltool-0.3.6.1/xmltool/elements.py   xmltool(Download)
        if value:
            data += u' <span class="_tree_text">(%s)</span>' % (
                utils.truncate(value))
 
        css_class = TREE_PREFIX + ':'.join(prefixes or [])

src/t/w/twillrecord-0.01/twillrecord/Recorder.py   twillrecord(Download)
from cgi import FieldStorage
from urlparse import urlsplit
from utils import truncate, trace, get_version
class Request:
    """Store a tcpwatch request."""