NameError: global name is not defined

后端 未结 4 2086
借酒劲吻你
借酒劲吻你 2020-12-03 16:54

I\'m using Python 2.6.1 on Mac OS X.

I have two simple Python files (below), but when I run

python update_url.py

I get on

4条回答
  •  一生所求
    2020-12-03 17:39

    That's How Python works. Try this :

    from sqlitedbx import SqliteDBzz
    

    Such that you can directly use the name without the enclosing module.Or just import the module and prepend 'sqlitedbx.' to your function,class etc

提交回复
热议问题