openflexure-microscope-server/openflexure_microscope/common/labthings_core/utilities.py
2020-01-02 23:37:28 +00:00

9 lines
No EOL
189 B
Python

def get_docstring(obj):
ds = obj.__doc__
if ds:
return ds.strip()
else:
return ""
def get_summary(obj):
return get_docstring(obj).partition("\n")[0].strip()