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

All Samples(319)  |  Call(285)  |  Derive(0)  |  Import(34)
split(s [,sep [,maxsplit]]) -> list of strings

Return a list of the words in the string s, using sep as the
delimiter string.  If maxsplit is given, splits at no more than
maxsplit places (resulting in at most maxsplit+1 words).  If sep
is not specified or is None, any whitespace string is a separator.

(split and splitfields are synonymous)

        def split(s, sep=None, maxsplit=-1):
    """split(s [,sep [,maxsplit]]) -> list of strings

    Return a list of the words in the string s, using sep as the
    delimiter string.  If maxsplit is given, splits at no more than
    maxsplit places (resulting in at most maxsplit+1 words).  If sep
    is not specified or is None, any whitespace string is a separator.

    (split and splitfields are synonymous)

    """
    return s.split(sep, maxsplit)
        


src/g/r/grailbrowser-HEAD/src/printing/fonts/afm2py.py   grailbrowser(Download)
        line = string.strip(line)
        if line and line[0] == "#":
            continue
        parts = string.splitfields(line, "#")
        if len(parts) != 3:
            continue
        parts[0:1] = string.split(parts[0])

src/g/r/grailbrowser-HEAD/src/Authenticate.py   grailbrowser(Download)
 
        challenge = headers['www-authenticate']
        # <authscheme> realm="<value>" [, <param>="<value>"] ...
        parts = string.splitfields(challenge, ',')
        p = parts[0]
        i = string.find(p, '=')
        if i < 0: return

src/g/r/grailbrowser-HEAD/src/printing/filetypes/text.py   grailbrowser(Download)
    def feed(self, data):
        data = self.__buffer + data
        self.__buffer = ''
        strings = string.splitfields(data, "\f")
        if strings:
            for s in strings[:-1]:
                self.write_page(s)
    def strip_blank_lines(self, data):
        lines = map(string.rstrip, string.splitfields(data, "\n"))
        while lines:
            if string.strip(lines[0]) == "":
                del lines[0]
            else:
                break

src/g/r/grailbrowser-HEAD/src/bookmarks/nodes.py   grailbrowser(Download)
def norm_uri(uri):
    scheme, netloc, path, params, query, fragment \
            = urlparse.urlparse(uri)
    if scheme == "http" and ':' in netloc:
        loc = string.splitfields(netloc, ':')
        try:
            port = string.atoi(loc[-1], 10)

src/g/r/grailbrowser-HEAD/src/CacheMgr.py   grailbrowser(Download)
def parse_cache_control(s):
    def parse_directive(s):
        i = string.find(s, '=')
        if i >= 0:
            return (s[:i], s[i+1:])
        return (s, '')
    elts = string.splitfields(s, ',')
    def parse(self,parsed_rep):
        """Reads transaction log entry.
        """
        vars = string.splitfields(parsed_rep,'\t')
        self.key = vars[0]
        self.url = vars[1]
        self.file = vars[2]

src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Demo/pdist/cvslib.py   spike(Download)
    def getentry(self, line):
        words = string.splitfields(line, '/')
        if self.file and words[1] != self.file:
            raise ValueError, "file name mismatch"
        self.file = words[1]
        self.erev = words[2]
        self.edeleted = 0
    year = string.atoi(words[4])
    month = unctime_monthmap[words[1]]
    day = string.atoi(words[2])
    [hh, mm, ss] = map(string.atoi, string.splitfields(words[3], ':'))
    ss = ss - time.timezone
    return time.mktime((year, month, day, hh, mm, ss, 0, 0, 0))
 

src/s/p/spike-HEAD/vendor/stackless/current/Demo/pdist/cvslib.py   spike(Download)
    def getentry(self, line):
        words = string.splitfields(line, '/')
        if self.file and words[1] != self.file:
            raise ValueError, "file name mismatch"
        self.file = words[1]
        self.erev = words[2]
        self.edeleted = 0
    year = string.atoi(words[4])
    month = unctime_monthmap[words[1]]
    day = string.atoi(words[2])
    [hh, mm, ss] = map(string.atoi, string.splitfields(words[3], ':'))
    ss = ss - time.timezone
    return time.mktime((year, month, day, hh, mm, ss, 0, 0, 0))
 

src/s/p/spike-HEAD/vendor/Python/v2.5.1/Demo/pdist/cvslib.py   spike(Download)
    def getentry(self, line):
        words = string.splitfields(line, '/')
        if self.file and words[1] != self.file:
            raise ValueError, "file name mismatch"
        self.file = words[1]
        self.erev = words[2]
        self.edeleted = 0
    year = string.atoi(words[4])
    month = unctime_monthmap[words[1]]
    day = string.atoi(words[2])
    [hh, mm, ss] = map(string.atoi, string.splitfields(words[3], ':'))
    ss = ss - time.timezone
    return time.mktime((year, month, day, hh, mm, ss, 0, 0, 0))
 

src/s/p/spike-HEAD/vendor/Python/current/Demo/pdist/cvslib.py   spike(Download)
    def getentry(self, line):
        words = string.splitfields(line, '/')
        if self.file and words[1] != self.file:
            raise ValueError, "file name mismatch"
        self.file = words[1]
        self.erev = words[2]
        self.edeleted = 0
    year = string.atoi(words[4])
    month = unctime_monthmap[words[1]]
    day = string.atoi(words[2])
    [hh, mm, ss] = map(string.atoi, string.splitfields(words[3], ':'))
    ss = ss - time.timezone
    return time.mktime((year, month, day, hh, mm, ss, 0, 0, 0))
 

src/g/r/grailbrowser-HEAD/src/protocols/ftpAPI.py   grailbrowser(Download)
            port = ftplib.FTP_PORT
        path, attrs = splitattr(path)
        self.url = "ftp://%s%s" % (netloc, path)
        dirs = string.splitfields(path, '/')
        dirs, file = dirs[:-1], dirs[-1]
        self.content_length = None
        if not file:
                    del self.lines[-1]
                self.lines.append(None) # Mark the end
        else:
            lines = string.splitfields(data, '\n')
            if self.debuglevel > 3:
                for line in lines: print "*addl*", `line`
            if self.lines:

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