From 21c1c3cb1ee0809a30714b1920ed1861a11b708b Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Sun, 21 Mar 2021 02:35:30 -0400 Subject: [PATCH] add PrintMethods function --- IzzyLib/misc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/IzzyLib/misc.py b/IzzyLib/misc.py index 193376e..7045e62 100644 --- a/IzzyLib/misc.py +++ b/IzzyLib/misc.py @@ -153,6 +153,15 @@ def NfsCheck(path): return False +def PrintMethods(object, include_underscore=False): + for line in dir(object): + if line.startswith('_'): + if include_underscore: + print(line) + + else: + print(line) + class DotDict(dict): def __init__(self, value=None, **kwargs): '''Python dictionary, but variables can be set/get via attributes