0

I use a for loop to to start two functions, that basically do the same thing but accept input in different ways. Like so:

for funk in (f1, f2):
    worker = Thread(target=funk, args=())
    worker.start()

One thread watches a folder and uses newly created (parsed) paths as arguments. The other awaits user's input('Some prompt: ').

Both produce the same type of log output to the console. After the prompt, a file will potentially be created and a lot of output will be printed. This will make a blinking cursor block buried in the text and, to the unassuming user, completely irrelevant. Also what if print is started from the other Thread while i'm in the middle of input(haven't tried it but it seems as a potential source of trouble).

How to pin or redraw( without repeating ) at the last line of the console?

Milos Grujic
  • 379
  • 2
  • 13

1 Answers1

0

I'm sure there's a better way to do this, but maybe you can have the function awaiting user input refresh once in a while, by putting the code provided in this answer in a loop.

Milan C.
  • 132
  • 1
  • 11