コード例 #1
0
ファイル: _curses.py プロジェクト: abhinavthomas/pypy
 def insstr(self, y, x, text, attr=None):
     text = _texttype(text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwinsstr(self._win, y, x, text)
     else:
         code = lib.winsstr(self._win, text)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "insstr")
コード例 #2
0
ファイル: _curses.py プロジェクト: solarmagic/hashcode
 def insstr(self, y, x, text, attr=None):
     text = _bytestype(text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwinsstr(self._win, y, x, text)
     else:
         code = lib.winsstr(self._win, text)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "insstr")