LineDemo class doesn't read input correctly

Bug #518982 reported by interjay
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

Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.