Re: stupid newbie question
Matthias Bussonnier <[email protected]> Wed, 6 Jan 2016 08:57:42 +0100
| Newsgroups | gmane.comp.python.ipython.user |
|---|---|
| Message-ID | <[email protected]> |
--===============1974348897144904479== Content-Type: multipart/alternative; boundary="Apple-Mail=_5A2EE659-A509-4396-A849-6DE463685616" --Apple-Mail=_5A2EE659-A509-4396-A849-6DE463685616 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 6, 2016, at 08:32, Paul Hobson <[email protected]> wrote: >=20 > On Tue, Jan 5, 2016 at 3:05 PM, jandyman <[email protected] = <mailto:[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. The column should actually be <session number>/<commandnumber> to be = more precise. Can you try in pure IPython/qtconsole ? it might be an IEP/Spyder issue. >=20 > Which version are you using? On jupyter 4.0.0, I get: > In [1]: x =3D 1 >=20 > In [2]: y =3D 2 >=20 > In [3]: In[1] + In[3] > Out[3]: 'x =3D 1In[1] + In[3]' >=20 > In [4]: In[1] > Out[4]: 'x =3D 1' >=20 > In [5]: %recall 1 >=20 > In [6]: x =3D 1 # this was automatically populated >=20 > I gotta say, what happened at In[3] isn't what I expcted. did you ment Out ? In [1]: 1 Out[1]: 1 In [2]: 2 Out[2]: 2 In [3]: Out[1] + Out[2] Out[3]: 3 --=20 M --Apple-Mail=_5A2EE659-A509-4396-A849-6DE463685616 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">On Jan 6, 2016, at 08:32, Paul Hobson <<a = href=3D"mailto:[email protected]" class=3D"">[email protected]</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div = dir=3D"ltr" class=3D""><div class=3D"gmail_extra"><div = class=3D"gmail_quote">On Tue, Jan 5, 2016 at 3:05 PM, jandyman <span = dir=3D"ltr" class=3D""><<a href=3D"mailto:[email protected]" = target=3D"_blank" class=3D"">[email protected]</a>></span> wrote:<br = class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left= -style:solid;padding-left:1ex">I'm sure this is beyond stupid, but I = cannot figure out how to get an ultra<br class=3D""> simple command history recall function to work. If I say "%hist -g = mystring"<br class=3D""> and get a list of commands, I'll see a "column" on the left with appear = to<br class=3D""> be command numbers. Let's say that I now want to put command 45 on = the<br class=3D""> prompt line, edit it, and then execute it. I would think I would say<br = class=3D""> "%recall 45". But this command doesn't seem to do anything. What = fundamental<br class=3D""> mistake am I making. I have tried this in shells in both IEP and = Spyder.<br = class=3D""></blockquote></div></div></div></div></blockquote><div><br = class=3D""></div><div><br class=3D""></div><div>The column should = actually be <session number>/<commandnumber> to be = more precise.</div><div><br class=3D""></div><div>Can you try in pure = IPython/qtconsole ? it might be an IEP/Spyder issue.</div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div = dir=3D"ltr" class=3D""><div class=3D"gmail_extra"><div = class=3D"gmail_quote"><div class=3D""><br class=3D""></div>Which version = are you using? On jupyter 4.0.0, I get:<div class=3D""><div = class=3D""><font face=3D"monospace, monospace" class=3D"">In [1]: x =3D = 1</font></div><div class=3D""><font face=3D"monospace, monospace" = class=3D""><br class=3D""></font></div><div class=3D""><font = face=3D"monospace, monospace" class=3D"">In [2]: y =3D = 2</font></div><div class=3D""><font face=3D"monospace, monospace" = class=3D""><br class=3D""></font></div><div class=3D""><font = face=3D"monospace, monospace" class=3D"">In [3]: In[1] + = In[3]</font></div><div class=3D""><font face=3D"monospace, monospace" = class=3D"">Out[3]: 'x =3D 1In[1] + In[3]'</font></div><div = class=3D""><font face=3D"monospace, monospace" class=3D""><br = class=3D""></font></div><div class=3D""><font face=3D"monospace, = monospace" class=3D"">In [4]: In[1]</font></div><div class=3D""><font = face=3D"monospace, monospace" class=3D"">Out[4]: 'x =3D = 1'</font></div><div class=3D""><font face=3D"monospace, monospace" = class=3D""><br class=3D""></font></div><div class=3D""><font = face=3D"monospace, monospace" class=3D"">In [5]: %recall = 1</font></div><div class=3D""><font face=3D"monospace, monospace" = class=3D""><br class=3D""></font></div></div><div class=3D""><span = style=3D"font-family:monospace,monospace" class=3D"">In [6]: x =3D = 1</span> <font face=3D"monospace, monospace" class=3D""># = this was automatically populated</font></div><div class=3D""><br = class=3D""></div><div class=3D"">I gotta say, what happened at<font = face=3D"monospace, monospace" class=3D""> In[3]</font> isn't what I = expcted.</div></div></div></div></div></blockquote><div><br = class=3D""></div><div>did you ment Out ?</div><div><br = class=3D""></div><div><br class=3D""></div><div><div>In [1]: = 1</div><div>Out[1]: 1</div><div><br class=3D""></div><div>In [2]: = 2</div><div>Out[2]: 2</div><div><br class=3D""></div><div>In [3]: Out[1] = + Out[2]</div><div>Out[3]: 3</div><div><br = class=3D""></div><div>-- </div><div>M</div><div><br = class=3D""></div><div><br class=3D""></div></div></div></body></html>= --Apple-Mail=_5A2EE659-A509-4396-A849-6DE463685616-- --===============1974348897144904479== 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 --===============1974348897144904479==--