Skip to content

Instantly share code, notes, and snippets.

@johnsonthomassonttf
johnsonthomassonttf / remove-empty-folders.py
Created January 31, 2021 02:07 — forked from ggorlen/remove-empty-folders.py
remove empty folders recursively
"""
removes all empty folders recursively in a directory
"""
import os
import sys
def delete_if_empty(path):
if not os.path.isdir(path):
return False
@johnsonthomassonttf
johnsonthomassonttf / hook_test.py
Last active April 30, 2020 23:25
Getting feedback on one way of calling hooks
class SomeProcess():
def do_it(self):
self.before_doing_it()
# actually do it
# much stuff to be done
self.after_doing_it()
def before_doing_it(self):