class BarnOwl(object):
    """
    The BarnOwl class contains a Python interface to BarnOwl's Perl bindings.
    An instance of this class is created as BarnOwl in the global Python
    namespace by the Perl initialization code.
    """
    def __init__(self, hash):
        self._hash = hash

    def command(self, *args):
        """
        Executes a BarnOwl command in the same manner as if the user had
        executed it at the BarnOwl command prompt. If the command returns a
        value, return it as a string, otherwise return None.
        """
        return self._hash['command'](*args)
    def getcurmsg(self):
        """
        Returns the current message as a "BarnOwl::Message" subclass, or None if there is no message selected
        """
        return self._hash['getcurmsg']()
    def getidletime(self):
        """Returns the length of time since the user has pressed a key, in seconds."""
        return self._hash['getidletime']()


    
def _loader(hash):
    global _hash, command, getcurmsg, getnumcols, getidletime, zephyr_getrealm, zephyr_getsender, zephyr_zwrite, ztext_stylestrip, zephyr_getsubs, queue_message, admin_message, start_question, start_password, start_edit_win, get_data_dir, get_config_dir, popless_text, popless_ztext, error, getnumcolors, add_dispatch, remove_dispatch, create_style, new_command, new_variable_int, new_variable_bool, new_variable_string, quote
    _hash = hash
    getcurmsg = hash["getcurmsg"]
    getnumcols = hash["getnumcols"]
    getidletime = hash["getidletime"]
    zephyr_getrealm = hash["zephyr_getrealm"]
    zephyr_getsender = hash["zephyr_getsender"]
    zephyr_zwrite = hash["zephyr_zwrite"]
    ztext_stylestrip = hash["ztext_stylestrip"]
    zephyr_getsubs = hash["zephyr_getsubs"]
    queue_message = hash["queue_message"]
    admin_message = hash["admin_message"]
    start_question = hash["start_question"]
    start_password = hash["start_password"]
    start_edit_win = hash["start_edit_win"]
    get_data_dir = hash["get_data_dir"]
    get_config_dir = hash["get_config_dir"]
    popless_text = hash["popless_text"]
    popless_ztext = hash["popless_ztext"]
    error = hash["error"]
    getnumcolors = hash["getnumcolors"]
    add_dispatch = hash["add_dispatch"]
    remove_dispatch = hash["remove_dispatch"]
    create_style = hash["create_style"]
    new_command = hash["new_command"]
    new_variable_int = hash["new_variable_int"]
    new_variable_bool = hash["new_variable_bool"]
    new_variable_string = hash["new_variable_string"]
    quote = hash["quote"]
def foo():
  return BarnOwl.getcurmsg().zsig()
