Re: stupid newbie question

Paul Hobson <[email protected]> Tue, 5 Jan 2016 23:32:30 -0800
Newsgroups gmane.comp.python.ipython.user
Message-ID <CADT3MEAxPUz=RUWwXHdeDduZsXpTqbZqJi15wuwZcaJQKsoP_w@mail.gmail.com>
--===============4927140078959723393==
Content-Type: multipart/alternative; boundary=001a114a838058c6e10528a55b65

--001a114a838058c6e10528a55b65
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 5, 2016 at 3:05 PM, jandyman <[email protected]> wrote:

> I'm sure this is beyond stupid, but I cannot figure out how to get an ultra
> simple command history recall function to work. If I say "%hist -g
> mystring"
> and get a list of commands, I'll see a "column" on the left with appear to
> be command numbers. Let's say that I now want to put command 45 on the
> prompt line, edit it, and then execute it. I would think I would say
> "%recall 45". But this command doesn't seem to do anything. What
> fundamental
> mistake am I making. I have tried this in shells in both IEP and Spyder.
>

Which version are you using? On jupyter 4.0.0, I get:
In [1]: x = 1

In [2]: y = 2

In [3]: In[1] + In[3]
Out[3]: 'x = 1In[1] + In[3]'

In [4]: In[1]
Out[4]: 'x = 1'

In [5]: %recall 1

In [6]: x = 1   # this was automatically populated

I gotta say, what happened at In[3] isn't what I expcted.

--001a114a838058c6e10528a55b65
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
ue, Jan 5, 2016 at 3:05 PM, jandyman <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<=
br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:soli=
d;padding-left:1ex">I&#39;m sure this is beyond stupid, but I cannot figure=
 out how to get an ultra<br>
simple command history recall function to work. If I say &quot;%hist -g mys=
tring&quot;<br>
and get a list of commands, I&#39;ll see a &quot;column&quot; on the left w=
ith appear to<br>
be command numbers. Let&#39;s say that I now want to put command 45 on the<=
br>
prompt line, edit it, and then execute it. I would think I would say<br>
&quot;%recall 45&quot;. But this command doesn&#39;t seem to do anything. W=
hat fundamental<br>
mistake am I making. I have tried this in shells in both IEP and Spyder.<br=
></blockquote><div><br></div>Which version are you using? On jupyter 4.0.0,=
 I get:<div><div><font face=3D"monospace, monospace">In [1]: x =3D 1</font>=
</div><div><font face=3D"monospace, monospace"><br></font></div><div><font =
face=3D"monospace, monospace">In [2]: y =3D 2</font></div><div><font face=
=3D"monospace, monospace"><br></font></div><div><font face=3D"monospace, mo=
nospace">In [3]: In[1] + In[3]</font></div><div><font face=3D"monospace, mo=
nospace">Out[3]: &#39;x =3D 1In[1] + In[3]&#39;</font></div><div><font face=
=3D"monospace, monospace"><br></font></div><div><font face=3D"monospace, mo=
nospace">In [4]: In[1]</font></div><div><font face=3D"monospace, monospace"=
>Out[4]: &#39;x =3D 1&#39;</font></div><div><font face=3D"monospace, monosp=
ace"><br></font></div><div><font face=3D"monospace, monospace">In [5]: %rec=
all 1</font></div><div><font face=3D"monospace, monospace"><br></font></div=
></div><div><span style=3D"font-family:monospace,monospace">In [6]: x =3D 1=
</span>=C2=A0 =C2=A0<font face=3D"monospace, monospace"># this was automati=
cally populated</font></div><div><br></div><div>I gotta say, what happened =
at<font face=3D"monospace, monospace"> In[3]</font> isn&#39;t what I expcte=
d.</div></div></div></div>

--001a114a838058c6e10528a55b65--

--===============4927140078959723393==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
IPython-User mailing list
[email protected]
https://mail.scipy.org/mailman/listinfo/ipython-user

--===============4927140078959723393==--