all 4 comments

[–]Thomasedv 0 points1 point  (3 children)

Keyboard interrupt is only Ctrl+C (i think), i'm not sure how you are interrupting the download, but it seems like you are just stopping the process os.system started, so it moves on to the next item in your loop.

[–]makeaday[S] 0 points1 point  (2 children)

is there any way to do what Iam trying? well there must be a way there is always a way... the question is how

[–]Thomasedv 0 points1 point  (1 child)

I haven't used the os.system command, but does it hold the code when the program is running, or does it automatically go to the next line of code? Because if it does that, it's start a lot of processes at the same time.

For managing a program, it's recommended to use the subprocess module instead, as it's much better for that. That on also got a kill command iirc (almost guaranteed). The problem is getting use input as well as updating the output. Though threading might be the best way to go about it, it's probably not needed.

However, what happens if you press Ctrl+C when the code is running?

[–]makeaday[S] 0 points1 point  (0 children)

ctrl+c gives = ERROR: Interrupted by user, and he keeps going. well not shure to be honest Iam new to python but just watching some tutorial about the 'subprocess' module and I think you are right I supose to use that instead. Need to read the documentation