コード例 #1
0
ファイル: adminCore.py プロジェクト: mathewraj/Thespian
 def thesplogStatus(self):
     "Write status to thesplog"
     from io import StringIO
     sd = StringIO()
     from thespian.system.messages.status import formatStatus
     try:
         sd.write('')
         SSD = lambda v: v
     except TypeError:
         class SSD(object):
             def __init__(self, sd): self.sd = sd
             def write(self, str_arg): self.sd.write(str_arg.decode('utf-8'))
     formatStatus(self.getStatus(), tofd=SSD(sd))
     thesplog('STATUS: %s', sd.getvalue())
コード例 #2
0
 def thesplogStatus(self):
     "Write status to thesplog"
     from io import StringIO
     sd = StringIO()
     from thespian.system.messages.status import formatStatus
     try:
         sd.write('')
         SSD = lambda v: v
     except TypeError:
         class SSD(object):
             def __init__(self, sd): self.sd = sd
             def write(self, str_arg): self.sd.write(str_arg.decode('utf-8'))
     formatStatus(self.getStatus(), tofd=SSD(sd))
     thesplog('STATUS: %s', sd.getvalue())