converting to Python - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: News and Discussions (https://python-forum.io/forum-31.html) +--- Thread: converting to Python (/thread-9124.html) |
converting to Python - Skaperen - Mar-22-2018 many years ago i wrote a semi-complex very critical bash script named "clean" that makes heavy use of the "find" command to select certain files and remove them. the idea is to occasionally cleanup leftovers. i have been wanting to make many changes to it and finally have decided this thing would be better in Python, especially since i was able to write my own file tree recursion generator function that flatten a tree in the order i expect. for the purpose of the "clean" script, my own generator is not required (just about any will work, i think). but, just in case, i will use my own. RE: converting to Python - nilamo - Mar-22-2018 Cool. Keep us updated :) RE: converting to Python - wavic - Mar-23-2018 As you know there is locate command which looks in a database and finding files is quick. You have to update that database regularly but it's not a big deal. It's not always applicable though. RE: converting to Python - Skaperen - Mar-24-2018 it needs to iterate over all the specified files. that much is easy enough. the current version is in bas+awk. the new version will be in Python3. maybe i should wait until i have 3.6? RE: converting to Python - nilamo - Mar-26-2018 If you already have a version of python3, there's no reason to wait. |