[ python-Bugs-1772686 ] exec() doesn't take an open file
SourceForge.net
noreply at sourceforge.net
Sun Aug 12 21:16:44 CEST 2007
Bugs item #1772686, was opened at 2007-08-12 10:12
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1772686&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 3000
>Status: Closed
>Resolution: Duplicate
Priority: 5
Private: No
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: exec() doesn't take an open file
Initial Comment:
exec() is documented to take an open file. The error message also says it takes one, however:
>>> exec(open('nn.py'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: exec() arg 1 must be a string, file, or code object, not TextIOWrapper
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2007-08-12 12:16
Message:
Logged In: YES
user_id=357491
Originator: NO
This is a duplicate of bug #1762972 which Guido and I have already
discussed how to deal with this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1772686&group_id=5470
More information about the Python-bugs-list
mailing list