Я написал простое приложение на Java, которое берет список путей и генерирует файл со всеми путями файлов в этом исходном списке.
Если у меня есть paths.txt, у которого есть:
c:\folder1\
c:\folder2\
...
...
c:\folder1000\
Мое приложение запускает рекурсивную функцию на каждом пути многопоточности и возвращает файл со всеми путями файлов в этих папках.
Теперь я хочу написать это приложение в Python.
Я написал простое приложение, которое использует os.walk()
для запуска через заданную папку и распечатывает пути к файлам.
Теперь я хочу запустить его параллельно, и я видел, что у Python есть несколько модулей для этого: многопоточность и многопроцессорность.
Какое лучшее, что нужно сделать? И в этом случае, как это делается?