python - Prevent buffer from closing -


i'm creating script output information in separate buffer:

def create_buffer():     global buffer      if not buffer:         buffer = weechat.buffer_new(             'vk', 'buffer_input_cb',             'main window %s script' % script_name,             'buffer_close_cb', ''         )  def buffer_input_cb(data, buffer, input_data):     return weechat.weechat_rc_ok  def buffer_close_cb(data, buffer):     return weechat.weechat_rc_ok 

i need buffer openned, user can type /close , not good.
can open new buffer in x seconds after buffer_close_cb called or try open when calling weechat.prnt function, cancel buffer closing if it's possible


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -