import sqlite3

willgun willgun at live.cn
Thu Jun 4 08:10:37 CEST 2009


Gabriel Genellina 写道:
> En Thu, 04 Jun 2009 02:15:39 -0300, willgun <willgun at live.cn> escribió:
> 
>> Traceback (most recent call last):
>>   File "C:\Users\hp\Desktop\SQLite3\sqlite3.py", line 2, in <module>
>>     import sqlite3
>>   File "C:\Users\hp\Desktop\SQLite3\sqlite3.py", line 3, in <module>
>>     con=sqlite3.connect(r'g:\db1')
>> AttributeError: 'module' object has no attribute 'connect'
>>
>> Anyone can tell me why?
> 
> Your own script is named sqlite3, right? When you execute "import 
> sqlite3" you end up importing your own script, not the library module...
> 
Thanks,I am quiet surprised to be applied so soon.



More information about the Python-list mailing list