Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66421 > unrolled thread
| Started by | greymausg <greymaus@mail.com> |
|---|---|
| First post | 2014-02-15 11:55 +0000 |
| Last post | 2014-02-15 15:50 +0100 |
| Articles | 6 — 4 participants |
Back to article view | Back to comp.lang.python
ipython greymausg <greymaus@mail.com> - 2014-02-15 11:55 +0000
Re: ipython Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-15 12:25 +0000
Re: ipython greymausg <greymaus@mail.com> - 2014-02-15 13:55 +0000
Re: ipython greymausg <greymaus@mail.com> - 2014-02-15 14:55 +0000
Re:ipython Dave Angel <davea@davea.name> - 2014-02-15 08:14 -0500
Re: ipython Peter Otten <__peter__@web.de> - 2014-02-15 15:50 +0100
| From | greymausg <greymaus@mail.com> |
|---|---|
| Date | 2014-02-15 11:55 +0000 |
| Subject | ipython |
| Message-ID | <slrnlfulce.1hm.greymaus@gmaus.org> |
using IPython, is there any way of recording the commands I have entered? -- maus . . ...
[toc] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-02-15 12:25 +0000 |
| Message-ID | <mailman.6989.1392467166.18130.python-list@python.org> |
| In reply to | #66421 |
On 15/02/2014 11:55, greymausg wrote: > using IPython, is there any way of recording the commands I have entered? > I believe ipython automatically stores the commands you enter. Searching for ipython+command+history should get you more detail than I can offer :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | greymausg <greymaus@mail.com> |
|---|---|
| Date | 2014-02-15 13:55 +0000 |
| Message-ID | <slrnlfurts.1lf.greymaus@gmaus.org> |
| In reply to | #66427 |
On 2014-02-15, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > On 15/02/2014 11:55, greymausg wrote: >> using IPython, is there any way of recording the commands I have entered? >> > > I believe ipython automatically stores the commands you enter. > Searching for ipython+command+history should get you more detail than I > can offer :) > What I was thinking of is like a perl Module WWW::Mechanize::Shell, which has a script included, "wwwshell.pl", which allows you to enter commands to explore web sites, then enter "source x", and it will save the commands you have used to a script, 'x'. This can be run straight to do what you want, say scraping a web site. -- maus . . ...
[toc] | [prev] | [next] | [standalone]
| From | greymausg <greymaus@mail.com> |
|---|---|
| Date | 2014-02-15 14:55 +0000 |
| Message-ID | <slrnlfuvjb.80i.greymaus@gmaus.org> |
| In reply to | #66436 |
On 2014-02-15, greymausg <greymaus@mail.com> wrote: > On 2014-02-15, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: >> On 15/02/2014 11:55, greymausg wrote: >>> using IPython, is there any way of recording the commands I have entered? >>> >> >> I believe ipython automatically stores the commands you enter. >> Searching for ipython+command+history should get you more detail than I >> can offer :) >> > > What I was thinking of is like a perl Module WWW::Mechanize::Shell, > which has a script included, "wwwshell.pl", which allows you to > enter commands to explore web sites, then enter "source x", Sorry "script x" > and it will save the commands you have used to a script, 'x'. > This can be run straight to do what you want, say scraping a > web site. > > -- maus . . ...
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <davea@davea.name> |
|---|---|
| Date | 2014-02-15 08:14 -0500 |
| Message-ID | <mailman.6992.1392469837.18130.python-list@python.org> |
| In reply to | #66421 |
greymausg <greymaus@mail.com> Wrote in message: > using IPython, is there any way of recording the commands I have entered? > Try the history command. http://ipython.org/ipython-doc/rel-1.1.0/api/generated/IPython. core.magics.history.html -- DaveA
[toc] | [prev] | [next] | [standalone]
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2014-02-15 15:50 +0100 |
| Message-ID | <mailman.7003.1392475842.18130.python-list@python.org> |
| In reply to | #66421 |
greymausg wrote:
> using IPython, is there any way of recording the commands I have entered?
Did you ever enter
?
in ipython?
In [1]: a = float(raw_input("a? "))
a? 1
In [2]: b = float(raw_input("b? "))
b? 2
In [3]: ab = a + b
In [4]: c = ab*ab
In [5]: print c
9.0
In [6]: In[1:3]
Out[6]: u'a = float(raw_input("a? "))\nb = float(raw_input("b? "))\n'
In [7]: %macro abc 1:6
Macro `abc` created. To execute, type its name (without quotes).
Macro contents:
a = float(raw_input("a? "))
b = float(raw_input("b? "))
ab = a + b
c = ab*ab
print c
In [8]: abc
------> abc()
a? 2
b? 2
16.0
In [14]:
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web