(fileObj: TextIO = None, prefix: str = None, publisher: Publisher = None, all: bool = True,
                         **kwargs)
Will cause all pubsub notifications of pubsub "actions" (such as new topic created, message sent, listener died
    etc) to be written to specified file (or stdout if none given). The fileObj need only provide a 'write(string)'
    method.
    
    The first two arguments are the same as those of NotifyByWriteFile constructor. The 'all' and kwargs arguments
    are those of pubsub's setNotificationFlags(), except that 'all' defaults to True.  See useNotifyByPubsubMessage()
    for an explanation of pubModule (typically only if pubsub inside wxPython's wx.lib)
Will cause all pubsub notifications of pubsub "actions" (such as new topic created, message sent, listener died
    etc) to be written to specified file (or stdout if none given). The fileObj need only provide a 'write(string)'
    method.
    
    The first two arguments are the same as those of NotifyByWriteFile constructor. The 'all' and kwargs arguments
    are those of pubsub's setNotificationFlags(), except that 'all' defaults to True.  See useNotifyByPubsubMessage()
    for an explanation of pubModule (typically only if pubsub inside wxPython's wx.lib)
Will cause all pubsub notifications of pubsub actions ( such as new topic created message sent listener died etc ) to be written to specified file ( or stdout if none given ) . The fileObj need only provide a write ( string ) method . The first two arguments are the same as those of NotifyByWriteFile constructor . The all and kwargs arguments are those of pubsub s setNotificationFlags () except that all defaults to True . See useNotifyByPubsubMessage () for an explanation of pubModule ( typically only if pubsub inside wxPython s wx . lib )
def useNotifyByWriteFile(fileObj: TextIO = None, prefix: str = None, publisher: Publisher = None, all: bool = True,
                         **kwargs):
    """
    Will cause all pubsub notifications of pubsub "actions" (such as new topic created, message sent, listener died
    etc) to be written to specified file (or stdout if none given). The fileObj need only provide a 'write(string)'
    method.
    
    The first two arguments are the same as those of NotifyByWriteFile constructor. The 'all' and kwargs arguments
    are those of pubsub's setNotificationFlags(), except that 'all' defaults to True.  See useNotifyByPubsubMessage()
    for an explanation of pubModule (typically only if pubsub inside wxPython's wx.lib)
    """

    if publisher is None:
        from .. import pub
        publisher = pub.getDefaultPublisher()
    notifHandler = NotifyByWriteFile(fileObj, prefix)
    
    publisher.addNotificationHandler(notifHandler)
    publisher.setNotificationFlags(all=all, **kwargs)
def useNotifyByWriteFile ( fileObj : TextIO = None , prefix : str = None , publisher : Publisher = None , all : bool = True , * * kwargs ) : if publisher is None : from . . import pub publisher = pub . getDefaultPublisher ( ) notifHandler = NotifyByWriteFile ( fileObj , prefix ) publisher . addNotificationHandler ( notifHandler ) publisher . setNotificationFlags ( all = all , * * kwargs )