python类joinfields()的实例源码

ftp.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def sendportcmd(s, f, port):
    hostname = gethostname()
    hostaddr = gethostbyname(hostname)
    hbytes = string.splitfields(hostaddr, '.')
    pbytes = [repr(port//256), repr(port%256)]
    bytes = hbytes + pbytes
    cmd = 'PORT ' + string.joinfields(bytes, ',')
    s.send(cmd + '\r\n')
    code = getreply(f)


# Process an ftp reply and return the 3-digit reply code (as a string).
# The reply should be a line of text starting with a 3-digit number.
# If the 4th char is '-', it is a multi-line reply and is
# terminate by a line starting with the same 3-digit number.
# Any text while receiving the reply is echoed to the file.
#
dbrecio.py 文件源码 项目:hostapd-mana 作者: adde88 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def writelines(self, list):
        self.write(string.joinfields(list, ''))
dbrecio.py 文件源码 项目:oil 作者: oilshell 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def writelines(self, list):
        self.write(string.joinfields(list, ''))
dbrecio.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def writelines(self, list):
        self.write(string.joinfields(list, ''))
morse.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def flush(self):
        print 'flush: %d blocks, %d bytes' % (len(self._buffer), self._filled)
        if self._buffer:
            import string
            self._base.writeframes(string.joinfields(self._buffer, ''))
            self._buffer = []
            self._filled = 0
dbrecio.py 文件源码 项目:sslstrip-hsts-openwrt 作者: adde88 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def writelines(self, list):
        self.write(string.joinfields(list, ''))
codec010.py 文件源码 项目:AmqpCode 作者: SVADemoAPP 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def write_map(self, m):
    sc = StringCodec()
    if m is not None:
      sc.write_uint32(len(m))
      sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), ""))
    self.write_vbin32(sc.encoded)
codec010.py 文件源码 项目:qpid-python 作者: apache 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def write_map(self, m):
    sc = StringCodec()
    if m is not None:
      sc.write_uint32(len(m))
      sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), ""))
    self.write_vbin32(sc.encoded)
PSDraw.py 文件源码 项目:CNCGToolKit 作者: cineuse 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def text(self, xy, text):
        text = string.joinfields(string.splitfields(text, "("), "\\(")
        text = string.joinfields(string.splitfields(text, ")"), "\\)")
        xy = xy + (text,)
        self.fp.write("%d %d M (%s) S\n" % xy)
wordnet.py 文件源码 项目:rensapy 作者: RensaProject 项目源码 文件源码 阅读 34 收藏 0 点赞 0 评论 0
def __str__(self):
    """Return a human-readable representation.

    >>> str(N['dog'][0].synset)
    '{noun: dog, domestic dog, Canis familiaris}'
    """
    return "{" + self.pos + ": " + string.joinfields(map(lambda sense:sense.form, self.getSenses()), ", ") + "}"
wordnet.py 文件源码 项目:rensapy 作者: RensaProject 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def __str__(self):
    """Return a human-readable representation.

    >>> str(N['dog'][0].synset)
    '{noun: dog, domestic dog, Canis familiaris}'
    """
    return "{" + self.pos + ": " + string.joinfields(map(lambda sense:sense.form, self.getSenses()), ", ") + "}"
producers.py 文件源码 项目:ZServer 作者: zopefoundation 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def writelines(self, lines):
        self.data = self.data + string.joinfields(
            lines,
            '\r\n'
        ) + '\r\n'
filesys.py 文件源码 项目:ZServer 作者: zopefoundation 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def more(self):
        if not self.file_list:
            return ''
        else:
                # do a few at a time
            bunch = self.file_list[:50]
            if self.long:
                bunch = map(self.longify, bunch)
            self.file_list = self.file_list[50:]
            return string.joinfields(bunch, '\r\n') + '\r\n'
select_trigger.py 文件源码 项目:ZServer 作者: zopefoundation 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def writelines(self, lines):
        self.write(
            string.joinfields(
                lines,
                '\r\n'
            ) + '\r\n'
        )
monitor.py 文件源码 项目:ZServer 作者: zopefoundation 项目源码 文件源码 阅读 37 收藏 0 点赞 0 评论 0
def hex_digest(s):
    m = md5()
    m.update(s)
    return string.joinfields(
        map(lambda x: hex(ord(x))[2:], map(None, m.digest())),
        '',
    )
monitor.py 文件源码 项目:ZServer 作者: zopefoundation 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def writelines(self, lines):
        self.data = self.data + string.joinfields(
            lines,
            '\r\n'
        ) + '\r\n'
        self.check_data()
wordnet.py 文件源码 项目:RePhraser 作者: MissLummie 项目源码 文件源码 阅读 37 收藏 0 点赞 0 评论 0
def __str__(self):
    """Return a human-readable representation.

    >>> str(N['dog'][0].synset)
    '{noun: dog, domestic dog, Canis familiaris}'
    """
    return "{" + self.pos + ": " + string.joinfields(map(lambda sense:sense.form, self.getSenses()), ", ") + "}"
wordnet.py 文件源码 项目:RePhraser 作者: MissLummie 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def __str__(self):
    """Return a human-readable representation.

    >>> str(N['dog'][0].synset)
    '{noun: dog, domestic dog, Canis familiaris}'
    """
    return "{" + self.pos + ": " + string.joinfields(map(lambda sense:sense.form, self.getSenses()), ", ") + "}"
PSDraw.py 文件源码 项目:InstagramPosting 作者: LeviParadis 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def text(self, xy, text):
        text = string.joinfields(string.splitfields(text, "("), "\\(")
        text = string.joinfields(string.splitfields(text, ")"), "\\)")
        xy = xy + (text,)
        self.fp.write("%d %d M (%s) S\n" % xy)
wordnet.py 文件源码 项目:Verideals 作者: Derrreks 项目源码 文件源码 阅读 40 收藏 0 点赞 0 评论 0
def __str__(self):
    """Return a human-readable representation.

    >>> str(N['dog'][0].synset)
    '{noun: dog, domestic dog, Canis familiaris}'
    """
    return "{" + self.pos + ": " + string.joinfields(map(lambda sense:sense.form, self.getSenses()), ", ") + "}"
wordnet.py 文件源码 项目:Verideals 作者: Derrreks 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def __str__(self):
    """Return a human-readable representation.

    >>> str(N['dog'][0].synset)
    '{noun: dog, domestic dog, Canis familiaris}'
    """
    return "{" + self.pos + ": " + string.joinfields(map(lambda sense:sense.form, self.getSenses()), ", ") + "}"
PSDraw.py 文件源码 项目:ngx_status 作者: YoYoAdorkable 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def text(self, xy, text):
        text = string.joinfields(string.splitfields(text, "("), "\\(")
        text = string.joinfields(string.splitfields(text, ")"), "\\)")
        xy = xy + (text,)
        self.fp.write("%d %d M (%s) S\n" % xy)


问题


面经


文章

微信
公众号

扫码关注公众号