Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/m/i/mixminion-HEAD/lib/mixminion/NetUtils.py   mixminion(Download)
import sys
import time
from mixminion.Common import LOG, TimeoutError, _ALLCHARS
import mixminion._minionlib
 
def normalizeIP6(ip6):
    """If IP is an IPv6 address, return it in canonical form.  Raise
       ValueError if it isn't."""
    ip = ip6.strip()
    bad = ip6.translate(_ALLCHARS, _IP6_CHARS)

src/m/i/mixminion-HEAD/lib/mixminion/Config.py   mixminion(Download)
       """
    s = s.strip()
    bad = s.translate(mixminion.Common._ALLCHARS, _NICKNAME_CHARS)
    if len(bad):
        raise ConfigError("Invalid characters %r in nickname %r" % (bad,s))