Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66421 > unrolled thread

ipython

Started bygreymausg <greymaus@mail.com>
First post2014-02-15 11:55 +0000
Last post2014-02-15 15:50 +0100
Articles 6 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  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

#66421 — ipython

Fromgreymausg <greymaus@mail.com>
Date2014-02-15 11:55 +0000
Subjectipython
Message-ID<slrnlfulce.1hm.greymaus@gmaus.org>
using IPython, is there any way of recording the commands I have entered?


-- 
maus
 .
  .
...

[toc] | [next] | [standalone]


#66427

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-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]


#66436

Fromgreymausg <greymaus@mail.com>
Date2014-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]


#66447

Fromgreymausg <greymaus@mail.com>
Date2014-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]


#66430

FromDave Angel <davea@davea.name>
Date2014-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]


#66445

FromPeter Otten <__peter__@web.de>
Date2014-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