6 from datetime
import datetime
15 if isinstance(val, datetime):
16 val = val.strftime(
'%Y-%m-%d %H:%M:%S')
20 def date_format(time_obj=time, fmt='%Y-%m-%d %H:%M:%S
') -> str:
28 _t = time.localtime(_tm)
29 return time.strftime(fmt, _t)
37 d_time = datetime.fromtimestamp(t_time)
38 except OSError
as ose:
47 retD = list(set(dir(cls)).difference(set(BASE_ATTR)))
53 module = o.__class__.__module__
54 if module
is None or module == str.__class__.__module__:
55 cls_name = o.__class__.__name__
57 cls_name = module +
'.' + o.__class__.__name__
59 if cls_name ==
'type':
60 cls_name = o.__base__.__module__ +
'.' + o.__base__.__name__
67 if isinstance(content, str):
69 elif isinstance(content, tuple):
71 if isinstance(c, tuple):
76 temp.append(str(content))
79 return ''.join([str(_)
for _
in temp])
92 [_sep_path.extend(item.split(
'\\'))
for item
in s]
95 _end = _sep_path[len(_sep_path) - 1]
97 _path += str(i) + os.sep
100 if not os.path.exists(_path):
104 with open(os.path.join(_path), mode=
"a", encoding=
"UTF-8")
as f:
105 f.write(_write_content)