Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
converting to Python
#1
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Cool. Keep us updated :)
Reply
#3
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.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
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?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#5
If you already have a version of python3, there's no reason to wait.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020