Ticket #189 (closed defect: fixed)

Opened 1 year ago

Last modified 11 months ago

History index bug when ipython is embedded in a GTK application

Reported by: tom_l Assigned to: vivainio
Priority: normal Milestone:
Component: ipython Version:
Severity: major Keywords:
Cc:

Description

I'm trying to embed an Ipython console in my GTK app.

If you launch the script in http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK and do:

for i in range(5):
    print i

You get :

---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)

/usr/lib/python2.5/site-packages/IPython/iplib.py in raw_input(self, prompt, continue_prompt)
   2039                         histlen = self.readline.get_current_history_length()
   2040                         newhist = self.input_hist_raw[-1].rstrip()
-> 2041                         self.readline.remove_history_item(histlen-1)
   2042                         self.readline.replace_history_item(histlen-2,newhist)
   2043                     except AttributeError:

<type 'exceptions.ValueError'>: History index cannot be negative
   ...:

I use the package present in the Ubuntu Feisty repositories and the ipython_view.py file present on the webpage: http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK

Change History

12/30/07 16:45:24 changed by vivainio

  • status changed from new to assigned.
  • owner changed from fperez to vivainio.

12/31/07 07:06:05 changed by vivainio

  • status changed from assigned to closed.
  • resolution set to fixed.

Closed by r2915.