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 skip.montanaro
Recipients
Date 2007-03-28.19:05:03
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Stick this in a file (say, printfile.py):

    print __file__

If I run it as "python printfile.py" using Python 2.4, 2.5 or 2.6 it prints as expected, e.g.:

    % python ~/tmp/printfile.py
    /Users/skip/tmp/printfile.py

If, however, I run it under control of the trace module I get something entirely different:

    % python -m trace --count ~/tmp/printfile.py
    /Users/skip/local/lib/python2.6/trace.py
    % python -m trace --trace ~/tmp/printfile.py
     --- modulename: threading, funcname: settrace
    threading.py(70):     _trace_hook = func
     --- modulename: trace, funcname: <module>
    <string>(1):   --- modulename: trace, funcname: <module>
    printfile.py(1): print __file__
    /Users/skip/local/lib/python2.6/trace.py

Definitely looks buggy to me...
History
Date User Action Args
2007-08-23 14:52:48adminlinkissue1690103 messages
2007-08-23 14:52:48admincreate