[issue16974] when "python -c command" does a traceback, it open the file "<string>"

Eric Lammerts report at bugs.python.org
Tue Jan 15 22:40:06 CET 2013


New submission from Eric Lammerts:

$ echo lovely spam > "<string>"

$ python -c 'open("nonexistent","r")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    lovely spam
IOError: [Errno 2] No such file or directory: 'nonexistent'

I see this in python 2.7.3 and 3.2.3 from Ubuntu 12.04.

----------
messages: 180055
nosy: eric-bugs-python
priority: normal
severity: normal
status: open
title: when "python -c command" does a traceback, it open the file "<string>"
type: behavior
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16974>
_______________________________________


More information about the Python-bugs-list mailing list