0

i'm trying to make an auto compiler for a file using pyinstaller. here is the auto compiler code:

import os
os.system('pyinstaller Main.py')
os.remove('Main.spec')

but then the cmd asks: "The output directory: " C:\ Users... " and all it's contents will be removed! Continue? y/n " then the user must press y to delete the unwanted file. is there any way to "auto input " the key Y and continue deleting unwanted files? (The pyinstaller creates the "mainfile".specs, build folder ( unwanted) and dist folder ( program compiled into it)) srry for bad english

xNecr00x
  • 29
  • 3
  • maybe try passing rm -r (or whatever the windows equivalent is) as a shell command. See here: http://stackoverflow.com/questions/89228/calling-an-external-command-in-python – Paul Gowder Jun 26 '15 at 02:42

1 Answers1

1

It appears pyinstaller has an option -y or --noconfirm to avoid such an interactive question. Have you tried that?