MimeWriter.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:pefile.pypy 作者: cloudtracer 项目源码 文件源码
def startmultipartbody(self, subtype, boundary=None, plist=[], prefix=1):
        """Returns a file-like object for writing the body of the message.

        Additionally, this method initializes the multi-part code, where the
        subtype parameter provides the multipart subtype, the boundary
        parameter may provide a user-defined boundary specification, and the
        plist parameter provides optional parameters for the subtype.  The
        optional argument, prefix, determines where the header is inserted;
        0 means append at the end, 1 means insert at the start. The default
        is to insert at the start.  Subparts should be created using the
        nextpart() method.

        """
        self._boundary = boundary or mimetools.choose_boundary()
        return self.startbody("multipart/" + subtype,
                              [("boundary", self._boundary)] + plist,
                              prefix=prefix)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号