IPython - Enhanced Interactive Python

LineDemo class doesn't read input correctly

Reported by interjay on 2010-02-08
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Unassigned

Bug Description

LineDemo class tries to execute its input letter-by-letter instead of line-by-line.

In demo.py in LineDemo.reload, the line that says:

src_b = [l for l in self.fobj.readline() if l.strip()]

should say:

src_b = [l for l in self.fobj.readlines() if l.strip()]

Additionally, it seems like self.src will not be set correctly since it rereads the file without returning the file pointer to the beginning first. However, this doesn't matter as this member doesn't seem to do anything.

Related branches

Fernando Perez (fdo.perez) wrote :

Thanks for the report! Fix committed to trunk (r1262) and 0.10.1 branch (r1239).

Changed in ipython:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers