0

My script asks for a lot of inputs so every time I test the program I have to manually type each one at a time. What I want to do is save all the inputs with which I try the program in a file and just tell python that if it needs a user input it should read the next line of the file. If I remember correctly there was a really simple way to do this on linux, but I don't remember how it was.

Edit: what I want to do is manually create another file with some format to pass it to python when running the program so that it reads inputs that would normally be several and manually typed by the user from that file.

Could it be something like python program.py -input input.in? where input.in is the file with the inputs I want to use, and -input another argument that I don't remember.

2
  • What you have tried? Commented Nov 24, 2017 at 1:53
  • I just don't know how to do what I want, I tried googling but didn't find anything. And I know there is a command that does that but I don't remember which or how to use. Commented Nov 24, 2017 at 2:03

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.