Re: Silly import question (__file__ attribute)

2006-03-10 Thread Steven D'Aprano
On Thu, 09 Mar 2006 17:25:20 -0500, Jack Diederich wrote: > It is a built-in module so it doesn't have a .so (dll) or .py file > to mention. Wouldn't it make sense for module.__file__ to be set to None rather than completely missing in this case? -- Steven. -- http://mail.python.org/mailman/

Re: Silly import question (__file__ attribute)

2006-03-09 Thread Fredrik Lundh
"mh" wrote: > So on most modules I import, I can access the .__file__ attribute to > find the implementation. ie: > >>> import time > >>> time.__file__ > '/data1/virtualpython/lib/python2.3/lib-dynload/timemodule.so' > >>> import socket > >>> socket.__file__ > '/data1/virtualpython/lib/python2.3/

Re: Silly import question (__file__ attribute)

2006-03-09 Thread Jack Diederich
On Thu, Mar 09, 2006 at 02:04:45PM -0800, mh wrote: > So on most modules I import, I can access the .__file__ attribute to > find the implementation. ie: > >>> import time > >>> time.__file__ > '/data1/virtualpython/lib/python2.3/lib-dynload/timemodule.so' > >>> import socket > >>> socket.__file__

Silly import question (__file__ attribute)

2006-03-09 Thread mh
So on most modules I import, I can access the .__file__ attribute to find the implementation. ie: >>> import time >>> time.__file__ '/data1/virtualpython/lib/python2.3/lib-dynload/timemodule.so' >>> import socket >>> socket.__file__ '/data1/virtualpython/lib/python2.3/socket.pyc' This doesn't wor