6

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'.

Dharman
  • 30,962
  • 25
  • 85
  • 135
kiri
  • 2,522
  • 4
  • 26
  • 44

1 Answers1

5

You can access it using filename attribute:

a.filename
falsetru
  • 357,413
  • 63
  • 732
  • 636