def open(cls, *args, **kwargs):
        """just something to make it easier to quickly open a connection, do something
        and then close it"""
        c = cls(*args, **kwargs)
        c.connect()
        try:
            yield c

        finally:
            c.close()
def open ( cls , * args , ** kwargs ) : c = cls ( * args , ** kwargs ) c . connect ( ) try : yield c finally : c . close ( )
just something to make it easier to quickly open a connection, do something
        and then close it