Silly import question (__file__ attribute)

mh sesquile at
Thu Mar 9 23:04:45 CET 2006

So on most modules I import, I can access the .__file__ attribute to
find the implementation.  ie:
>>> import time
>>> time.__file__
>>> import socket
>>> socket.__file__

This doesn't work on the "thread" module:
>>> import thread
>>> thread.__file__
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute '__file__'

A few questions.  Why?  Where is or  (I can't find



More information about the Python-list mailing list