textio.py 文件源码

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

项目:specto 作者: mrknow 项目源码 文件源码
def string_list_file(cls, filename, values):
        """
        Write a list of strings to a file.
        If a file of the same name exists, it's contents are replaced.

        See L{HexInput.string_list_file} for a description of the file format.

        @type  filename: str
        @param filename: Name of the file to write.

        @type  values: list( int )
        @param values: List of strings to write to the file.
        """
        fd = open(filename, 'w')
        for string in values:
            print >> fd, string
        fd.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号