mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
ListedSubWindow: Switch to logging.
This commit is contained in:
1 parent
e925a95987
commit
c1b3d42a6a
1 file changed
+5
-2
@@ -1,7 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
from functools import reduce
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
class ListedSubWindow(object):
|
||||
def __init__(self):
|
||||
super(ListedSubWindow, self).__init__()
|
||||
@@ -17,7 +20,7 @@ class ListedSubWindow(object):
|
||||
def sub_win_add(self, name, win):
|
||||
self.sub_win_list.append((name, win))
|
||||
self.sub_win_cnt += 1
|
||||
print(f"+ {name} ({self.sub_win_cnt})")
|
||||
logger.info(f"Open window: {name} ({self.sub_win_cnt})")
|
||||
|
||||
def sub_win_del(self, name):
|
||||
self.sub_win_list = list(
|
||||
@@ -27,7 +30,7 @@ class ListedSubWindow(object):
|
||||
)
|
||||
)
|
||||
self.sub_win_cnt = len(self.sub_win_list)
|
||||
print(f"- {name} ({self.sub_win_cnt})")
|
||||
logger.info(f"Close window: {name} ({self.sub_win_cnt})")
|
||||
|
||||
def sub_win_exists(self, name):
|
||||
return reduce(
|
||||
|
||||
Reference in new issue
Block a user