# core/utils.py
#
#
""" utils package. """
__copyright__ = "Copyright 2015, B.H.J Thate"
## IMPORT
import types
## STRING
[docs]def to_str(obj):
res = ""
try: res = obj.json(indent=4)
except AttributeError:
if type(obj) == list: res = ", ".join([str(x) for x in obj])
elif type(obj) == types.ModuleType: res = str(obj)
return res