本文整理汇总了Python中zipfile.ZIP_FILECOUNT_LIMIT属性的典型用法代码示例。如果您正苦于以下问题:Python zipfile.ZIP_FILECOUNT_LIMIT属性的具体用法?Python zipfile.ZIP_FILECOUNT_LIMIT怎么用?Python zipfile.ZIP_FILECOUNT_LIMIT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类zipfile
的用法示例。
在下文中一共展示了zipfile.ZIP_FILECOUNT_LIMIT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: import zipfile [as 别名]
# 或者: from zipfile import ZIP_FILECOUNT_LIMIT [as 别名]
def setUp(self):
self._limit = zipfile.ZIP64_LIMIT
self._filecount_limit = zipfile.ZIP_FILECOUNT_LIMIT
zipfile.ZIP64_LIMIT = 1000
zipfile.ZIP_FILECOUNT_LIMIT = 9
line_gen = ("Test of zipfile line %d." % i
for i in range(0, FIXEDTEST_SIZE))
self.data = '\n'.join(line_gen)
# Make a source file with some lines
with open(TESTFN, "wb") as fp:
fp.write(self.data)
示例2: tearDown
# 需要导入模块: import zipfile [as 别名]
# 或者: from zipfile import ZIP_FILECOUNT_LIMIT [as 别名]
def tearDown(self):
zipfile.ZIP64_LIMIT = self._limit
zipfile.ZIP_FILECOUNT_LIMIT = self._filecount_limit
unlink(TESTFN)
unlink(TESTFN2)
示例3: setUp
# 需要导入模块: import zipfile [as 别名]
# 或者: from zipfile import ZIP_FILECOUNT_LIMIT [as 别名]
def setUp(self):
self._limit = zipfile.ZIP64_LIMIT
self._filecount_limit = zipfile.ZIP_FILECOUNT_LIMIT
zipfile.ZIP64_LIMIT = 1000
zipfile.ZIP_FILECOUNT_LIMIT = 9
# Make a source file with some lines
with open(TESTFN, "wb") as fp:
fp.write(self.data)