def set_interface(interface, name='<STR_LIT>'):
global interfaces<EOL>if not interface: raise ValueError('<STR_LIT>')<EOL>if name in interfaces:<EOL><INDENT>interfaces[name].close()<EOL><DEDENT>interfaces[name] = interface<EOL>
don't want to bother with a dsn? Use this method to make an interface available