0
    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
4

1 回答 1

0

类名Connection在回购https://github.com/KehaoWu/pgdb/blob/master/pgdb/pgdb.py#L15

PYPY 项目 pypi.org/project/pgdb

于 2020-07-13T14:06:44.363 回答