K
K
Kto Takoi2021-10-03 21:03:12
Python
Kto Takoi, 2021-10-03 21:03:12

How to make permanent parsing?

Is it possible to make the program constantly take the file?
For example, I have a folder in which there is a program, and a *.txt file comes into the folder.
Is it possible to make the program take this file and start parsing? If the file name is different.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScriptKiddo, 2021-10-03
@Realno_cheal

1) In a loop, check for the presence of files in the directory via os.listdir()
2) If a file has appeared, process it.
3) Delete/move the file
4) The loop restarts after the file is parsed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question