[Tutor] identifying if a path is heading into a zip file - windows
Alan Gauld
alan.gauld at yahoo.co.uk
Sun Mar 20 05:02:19 EDT 2022
> Take a second path:
>
> path= 'c:\my folder\a file.zip\a folder in the zip'
>
> Is there a way for python to know, without me physically breaking it down, that that path is in a zip file?
>
I don’t think so, the standard library tools simply analyse the text.
You would need to write a function that traversed the path checking for isfile()
Alan G.
More information about the Tutor
mailing list