def pprint(to_be_printed):
    """nicely formated print"""
    try:
        import pprint as pp
        pp.pprint(to_be_printed)
    except ImportError:
        if isinstance(to_be_printed, dict):
            print('{')
            for k, v in to_be_printed.items():
                print("'" + k + "'" if str(k) == k else k, ': ', "'" + v +
                    "'" if str(v) == v else v, sep='')
            print('}')
        else:
            print('could not import pprint module, appling regular print')
            print(to_be_printed)
