xNecr00x
xNecr00x

Reputation: 29

(Python) "auto input in cmd"

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

Upvotes: 0

Views: 214

Answers (1)

user707650
user707650

Reputation:

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

Upvotes: 1

Related Questions