'zip' module Flashcards

1
Q

zip = zipfile.ZipFile(‘file’, ‘mode’)

A

open a zip archive for manipulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

zip.namelist()

A

list files in zip archive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

zip.infolist()

A

list metadata of the files in the archive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

zip.getinfo(x)

A

get metadata for specific file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

zip.read(x)

A

read file inside zip archive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

(b’string’)

A

specify string as bytecode. bytecode is an attribute of the code object, among many other attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

zip.extract(x)

A

extract x file from the archive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

zip.extractall()

A

extract all files from zip archive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

zip.close()

A

close zip file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly