if __name__ == '__main__':
    # open a console for debugging
    message = """Console variables:

    analyzer : The currently active analyzer
    sweeps : A list of the currently selected sweeps
    view : The MiesNwbViewer instance
    nwb : The currently loaded NWB file
    man : ACQ4 manager
    man.currentFile : currently selected file in ACQ4 DataManager module

    """
    console = acq4.pyqtgraph.console.ConsoleWidget(text=message)
    console.catchNextException()
    console.show()

    # start up ACQ4 data manager
    m = acq4.Manager.Manager(argv=['-D', '-n', '-m', 'Data Manager'])
    dm = m.getModule('Data Manager')

    # create NWB viewer
    v = MultipatchNwbViewer()
    v.show()
    v.setWindowTitle('Multipatch NWB Viewer')

    # set up a convenient function for loading nwb from filename
    nwb = None
    def load_nwb(filename):
        global nwb

if __name__ == '__main__':
    # open a console for debugging
    message = """Console variables:

    analyzer : The currently active analyzer
    sweeps : A list of the currently selected sweeps
    view : The MiesNwbViewer instance
    nwb : The currently loaded NWB file
    man : ACQ4 manager
    man.currentFile : currently selected file in ACQ4 DataManager module

    """
    console = acq4.pyqtgraph.console.ConsoleWidget(text=message)
    console.catchNextException()
    console.show()

    # start up ACQ4 data manager
    m = acq4.Manager.Manager(argv=['-D', '-n', '-m', 'Data Manager'])
    dm = m.getModule('Data Manager')

    # create NWB viewer
    v = MultipatchNwbViewer()
    v.show()
    v.setWindowTitle('Multipatch NWB Viewer')

    # set up a convenient function for loading nwb from filename
    nwb = None
    def load_nwb(filename):
        global nwb