jw-python/tools/python/jwutils/Object.py
Jan Lindemann 428692ea3a Streamline Python file headers somewhat
- Add coding statement
  - Import all modules in one line where possible
  - Order: __future__, typing, plain imports, from imports,
    janware modules

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-07-10 05:14:06 +02:00

24 lines
605 B
Python

# -*- coding: utf-8 -*-
from __future__ import print_function
import jwutils.log
class Object(object): # export
def __init__(self):
self.log_level = jwutils.log.level
def log(self, prio, *args):
if self.log_level == jwutils.log.level:
jwutils.log.slog(prio, args)
return
if prio <= self.log_level:
msg = ""
for count, thing in enumerate(args):
msg += ' ' + str(*thing)
if len(msg):
print(msg[1:])
def debug(self, *args):
jwutils.log.slog(jwutils.log.DEBUG, args)