homepage

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.

Author prescod
Recipients
Date 2001年04月11日.18:52:39
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Make a file called "test.py"
----
import pack
print pack.func.func_code.co_filename
-----
Make a directory called "pack". Put a file in it 
called "__init__.py" with the contents:
def func(): pass
Now run test.py. It will compile a relative path into 
these modules. Now you can change to any directory on 
the system and run test.py and it will return the 
original relative path. The problem is that the 
relative path is compiled into the .pyc. It should be 
an absolute path.
History
Date User Action Args
2007年08月23日 13:53:50adminlinkissue415492 messages
2007年08月23日 13:53:50admincreate

AltStyle によって変換されたページ (->オリジナル) /