iso_file = "/path_to_iso"
iso = pycdlib.PyCdlib()
iso.open(iso_file)
for dir in iso.walk(iso_path="/"):
dir_name = dir[0]
file_list = dir[2]
print(dir_name)
for file in file_list:
if ";1" in file:
file = file.strip(';1')
print(" " + file)
#### some additional logic
Essentially I want to read each file name and for now print it out.
I am expecting an rpm packaged in the iso file. but when I am reading file names, i get only first word of the file. example:
abc-def-ghi.rpm
I get {8 char name}.rpm in the loop above. i want to get that file and run some rpm specific stuff on but then since I have abc.rpm as the name, my code exits with “file not found” error.
why is filename getting truncated to 8 chars? how do I fix it?
if it matters then I have Python 3.12.4 and i tested this on ubuntu OS and mac OS
TIA