Skip to content

Instantly share code, notes, and snippets.

@CodeLongAndProsper90
Created April 10, 2020 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeLongAndProsper90/f2d1a1b099e6c51f4039ef33194a5ad0 to your computer and use it in GitHub Desktop.
Save CodeLongAndProsper90/f2d1a1b099e6c51f4039ef33194a5ad0 to your computer and use it in GitHub Desktop.
Make an ISO the easy way
import os
import os.path
import shutil
files = []
while True:
print("[1]: Add files to staging area.")
print("[2]: Generate ISO.")
print("[3]: Abort.")
choice = input("> ")
if choice == '1':
File = input("What file do you want? ")
if os.path.exists(File):
files.append(File)
else:
print(f"{File}: No such file or directory")
elif choice == '2':
os.mkdir('temp')
for item in files:
shutil.move(item, 'temp')
os.system('genisoimage -o data.iso temp')
elif choice == '3':break
else:
print("Not found")
~
~
~
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment