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 zbysz
Recipients zbysz
Date 2009-04-02.10:31:17
SpamBayes Score 3.08642e-14
Marked as misclassified No
Message-id <1238668280.27.0.69442728469.issue5668@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-04-02 10:31:20zbyszsetrecipients: + zbysz
2009-04-02 10:31:20zbyszsetmessageid: <1238668280.27.0.69442728469.issue5668@psf.upfronthosting.co.za>
2009-04-02 10:31:19zbyszlinkissue5668 messages
2009-04-02 10:31:17zbyszcreate