def set_interface ( interface , name = '' ) : global interfaces if not interface : raise ValueError ( 'interface is empty' ) # close down the interface before we discard it if name in interfaces : interfaces [ name ] . close ( ) interfaces [ name ] = interface
python make clear interfaces
don t want to bother with a dsn? Use this method to make an interface available
def set_interface(interface, name=''):
    """
    don't want to bother with a dsn? Use this method to make an interface available
    """
    global interfaces

    if not interface: raise ValueError('interface is empty')

    # close down the interface before we discard it
    if name in interfaces:
        interfaces[name].close()

    interfaces[name] = interface