classification
Title: file "" on disk creates garbage output in stack trace
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.0, Python 2.4, Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, zbysz
Priority: normal Keywords:

Created on 2009-04-02 10:31 by zbysz, last changed 2009-04-28 13:02 by ajaksu2. This issue is now closed.

Messages (2)
msg85192 - (view) Author: Zbyszek Jędrzejewski-Szmek (zbysz) * Date: 2009-04-02 10:31
When running interactively, python checks for existence of file
"<stdin>" when trying to display a stack trace with code input from stdin.

# cat >> "<stdin>"
asdf asdf asdf

# python
Python 2.5.2 (r252:60911, Jun 25 2008, 17:58:32) 
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> asdf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    asdf asdf asdf
NameError: name 'asdf' is not defined

# strace -efile python
...
open("<stdin>", O_RDONLY)               = -1 ENOENT (No such file or
directory)
open("<stdin>", O_RDONLY)               = -1 ENOENT (No such file or
directory)
open("/home13/zbyszek/pm/<stdin>", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib/python25.zip/<stdin>", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib64/python2.5/<stdin>", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib64/python2.5/plat-linux2/<stdin>", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/lib64/python2.5/lib-tk/<stdin>", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib64/python2.5/lib-dynload/<stdin>", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/lib64/python2.5/site-packages/<stdin>", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/lib64/python2.5/site-packages/Numeric/<stdin>", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/lib64/python2.5/site-packages/PIL/<stdin>", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/lib64/python2.5/site-packages/gtk-2.0/<stdin>", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/<stdin>",
O_RDONLY) = -1 ENOENT (No such file or directory)

This is exactly the same in python 2.4, 2.5 and 3.0. I haven't tested
other versions.
msg86734 - (view) Author: Daniel Diniz (ajaksu2) (Python triager) Date: 2009-04-28 13:02
Duplicate of #1514420.
History
Date User Action Args
2009-04-28 13:02:55ajaksu2setstatus: open -> closed

nosy: + ajaksu2
messages: + msg86734

resolution: duplicate
stage: resolved
2009-04-02 10:31:19zbyszcreate