This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Shared object modules in Windows have no __file__.
Type: Stage:
Components: Windows Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: alanmcintyre, jemfinch, loewis
Priority: normal Keywords:

Created on 2003-10-05 21:44 by jemfinch, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Messages (3)
msg18568 - (view) Author: Jeremy Fincher (jemfinch) Date: 2003-10-05 21:44
The subject basically says it.  Whether it's math.so,
operator.so, anything -- in *nix it has an __file__, in
Windows it doesn't.
msg18569 - (view) Author: Alan McIntyre (alanmcintyre) * (Python committer) Date: 2004-11-06 20:19
Logged In: YES 
user_id=1115903

In the case of the math module, I would assume that it
doesn't have a __file__ attribute on Windows because it's a
builtin and is rolled up into python2x.dll in the Windows
distribution. This seems to match up with the 2.3
codumentation: "The __file__ attribute is not present for C
modules that are statically linked into the interpreter; for
extension modules loaded dynamically from a shared library,
it is the pathname of the shared library file."

msg18570 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-12-19 18:07
Logged In: YES 
user_id=21627

It's as alanmcintyre says: math is not a shared object in
Windows. Closing this as invalid.
History
Date User Action Args
2022-04-10 16:11:38adminsetgithub: 39376
2003-10-05 21:44:02jemfinchcreate