[Zope-Coders] Re: [Zope-Checkins] CVS:
Zope/lib/python/DateTime/tests -testDateTime.py:1.12.6.3
Fred L. Drake, Jr.
fdrake@acm.org
Thu, 17 Oct 2002 11:52:09 -0400
Andreas Jung writes:
> Is there a reason why __file__ can not be set automatically by
> Python ?
Traditionally, it has not. Sometimes, it isn't possible. For
instance, when source code is loaded from standard input:
cat source.py | python
or when embedding source on the command line:
python -c 'print 42'
For those times when it *is* possible, I think Python should do so,
and Guido has expressed non-hostility toward the idea. I'll try to
have this in Python 2.3; I've assigned this feature to myself in
Python's issue tracker on SourceForge:
http://www.python.org/sf/624729
So there's hope yet!
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation