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

2013-01-15 Thread Eric Lammerts

Eric Lammerts added the comment:

Does it have to be an identifier in angle brackets? An empty string makes more 
sense to me.

--

___
Python tracker 
<http://bugs.python.org/issue16974>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-01-15 Thread Eric Lammerts

New submission from Eric Lammerts:

$ echo lovely spam > ""

$ python -c 'open("nonexistent","r")'
Traceback (most recent call last):
  File "", line 1, in 
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 ""
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 
<http://bugs.python.org/issue16974>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com