[pypy-issue] [issue1259] module __file__ attribute shows wrong path
bdk
tracker at bugs.pypy.org
Mon Feb 11 01:53:07 CET 2013
bdk <bdkearns at gmail.com> added the comment:
$ ./pypy/goal/pypy-c
Python 2.7.3 (8556098ab5f0, Feb 10 2013, 04:31:21)
[PyPy 2.0.0-beta1 with GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``why did you guys have to make the
builtin fortune more interesting than actual work? i just catched myself
restarting pypy 20 times''
>>>> import sys; sys.__file__
'/home/pypy/module/sys'
>>>> import cPickle; cPickle.__file__
'/home/ubuntu/pypy/lib_pypy/cPickle.pyc'
>>>> import os; os.__file__
'/home/ubuntu/pypy/lib-python/2.7/os.pyc'
>>>> import time; time.__file__
'../../pypy/module/rctime'
>>>>
these are both inconsistent and not correct. can they be fixed to give sane
answers? docs seem to imply they should behave like this:
http://pypy.readthedocs.org/en/latest/coding-guide.html#determining-the-
location-of-a-module-implementation
>>>> import sys
>>>> sys.__file__
'/home/hpk/pypy-dist/pypy/module/sys'
>>>> import cPickle
>>>> cPickle.__file__
'/home/hpk/pypy-dist/lib_pypy/cPickle..py'
>>>> import os
>>>> os.__file__
'/home/hpk/pypy-dist/lib-python/2.7/os.py'
>>>>
----------
release: -> 2.0
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1259>
________________________________________
More information about the pypy-issue
mailing list