Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the filepath of a ZipFile object?

If I have a zipfile.ZipFile object, how can I determine the file path of the zip file from the object?

a = zipfile.ZipFile('C:\\path\\zipfile.zip')

a.get_file_path()

where get_file_path() should return 'C:\\path\\zipfile.zip'.

like image 365
kiri Avatar asked Oct 03 '22 10:10

kiri


1 Answers

You can access it using filename attribute:

a.filename
like image 70
falsetru Avatar answered Oct 13 '22 10:10

falsetru