AttributeError: 'module' object has no attribute 'connect' in the pgdb module using python

AttributeError: 'module' object has no attribute 'connect' in the pgdb module using python

    import pgdb
    myConnection = pgdb.connect( host=hostname, user=username, password=password, database=database )
    doQuery( myConnection )
    myConnection.close()

我 运行 脚本时出现以下错误。

>>> AttributeError: 'module' object has no attribute 'connect'. Please help me out

回购 https://github.com/KehaoWu/pgdb/blob/master/pgdb/pgdb.py#L15

中的类名是 Connection

PYPY项目pypi.org/project/pgdb