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