openflexure-microscope-server/openflexure_microscope/common/labthings_core/utilities.py
2020-01-03 00:21:16 +00:00

10 lines
191 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()