willgun at live.cn
Thu Jun 4 07:42:01 EDT 2009
Andrew McNamara 写道:
> On 04/06/2009, at 4:14 PM, willgun wrote:
>>> What did you call the .py file? sqlite3.py? If so, you've just
>>> imported your own module again. 8-)
>>> After the import, try "print sqlite3.__file__", which will tell you
>>> where the module came from.
>> Thank you all the same.
>> I'm a student from China.It's painful for us to read python
>> documentation entirely due to poor english.So I often make these
> Don't worry - even experienced Python coders get caught by this one.
> Just remember the "print module.__file__" trick for next time something
> odd happens.
> When you import a module in python, it is only imported the first time
> you request it (which is why your import did not become recursive and
> raise an error).
I know it well now.Thanks.It seems that the mailing list is much greater
than most forums in China.
More information about the Python-list