[IPython-user] Slight Problem: Re: Test results (good?)

Ryan Krauss ryanlists@gmail....
Thu Apr 26 15:19:00 CDT 2007


Sorry, I am screwing up who I am sending this to.  This is to the list:

On 4/26/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> Actually, even when it runs with no apparent errors in my script, I am getting:
>
> In [4]: run bicycle.py
> ---------------------------------------------------------------------------
> exceptions.AttributeError                            Traceback (most recent call
>  last)
>
> E:\siue\AdvDynamics\chapter5\<ipython console>
>
> C:\Python24\Lib\site-packages\IPython\iplib.py in ipmagic(self, arg_s)
>     955         else:
>     956             magic_args = self.var_expand(magic_args,1)
> --> 957             return fn(magic_args)
>     958
>     959     def ipalias(self,arg_s):
>
> C:\Python24\Lib\site-packages\IPython\Shell.py in magic_run(self, parameter_s)
>     544
>     545     def magic_run(self,parameter_s=''):
> --> 546         Magic.magic_run(self,parameter_s,runner=self.mplot_exec)
>     547
>     548     # Fix the docstring so users see the original as well
>
> C:\Python24\Lib\site-packages\IPython\Magic.py in magic_run(self, parameter_s, r
> unner)
>    1674             if restore_main:
>    1675                 sys.modules['__main__'] = restore_main
> -> 1676             self.shell.reloadhist()
>    1677
>    1678         return stats
>
> C:\Python24\Lib\site-packages\IPython\iplib.py in reloadhist(self)
>    1255
>    1256         if self.has_readline:
> -> 1257             self.readline.clear_history()
>    1258             self.readline.read_history_file(self.shell.histfile)
>    1259
>
> AttributeError: 'module' object has no attribute 'clear_history'
>
>
> This continues to happen even after shutting down and restarting
> IPython.  It seems like something isn't getting cleared somehow (i.e.
> that this is an old error message).
>
> Ryan
>
> On 4/26/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> > I'm happy.  I just wasn't sure if you would be.  :D  (i.e. I didn't
> > know what the results were supposed to be).
> >
> > This is a significant feature in my mind.  There have been many times
> > when I went "Oh crap!, I shouldn't have run that script with that
> > input",  and then I have to decide if it is worth it to just close
> > IPython altogether or wait it out.
> >
> > Ryan
> >
> > On 4/26/07, Fernando Perez <fperez.net@gmail.com> wrote:
> > > On 4/25/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> > > > I just downloaded 0.8.1 and pyreadline 1.4.3.rc1 and tested the Ctrl-C
> > > > interrupt.  I think it worked but don't know how clean an exit I was
> > > > supposed to get.  My script stopped but printed out this:
> > >
> > > Looks good enough :)  Basically, since Ctrl-C is by definition
> > > asynchronous, the only things we can try to provide are:
> > >
> > > 1. Your code actually stops running.
> > >
> > > 2. Python doesn't crash at that point, nor does your session somehow
> > > get corrupted in a bizarre manner that makes it unusable from that
> > > point on.
> > >
> > > 3. [bonus] you get a meaningful traceback.
> > >
> > >
> > > It seems like you got all 3 :)
> > >
> > > Cheers,
> > >
> > >
> > > f
> > >
> >
>


More information about the IPython-user mailing list