I have an ISO image that I would like to distribute. However, to make setup easier for the user, I would like add a unique .config file to each .iso file.
Is there a way to use python to modify the iso file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are known ways of browsing or parsing ISO files with Python libraries (see this question), but adding a file to the ISO will require filesystem modification – which is definitely far from trivial.
You could instead try to mount the ISO on your filesystem, modify it from Python, then unmount it again. A very quick example that would work under Ubuntu:
You’ll want to use
subprocessinstead ofos.system, among other things, but this is a start.