New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
history -o works but history with -n produces identical results #3738
Comments
What are you expecting ?
It seem that you missread the docs and are expecting a |
I humbly request the command that will print the user input from line 10-11 with the output. As I read: -o also print outputs for each input. I understood in Fernando's video http://www.youtube.com/watch?feature=player_embedded&v=bP8ydKBCZiY that a user could print only the input and the output of the history if so desired. I've tried these variations none of which produced the only the input and not the output: Even Curiously produced only input which makes me wonder is -o is working at all. I would appreciate your assistance in the correct command for including input strings and the output. Here's the updated gist: your help is appreciated. |
Yes, but for the output to be printed, there need to be an output... in your example 10 and 11 do not have output so |
No there is no output.
no output, only display
output, which value is 'foo' hence
|
No I get the same as you. |
I was operating with the definitions of input was anything that a user entered and that output was anything that the computer spits out. Semantics problem, I guess. Ok, that said, how do I tell Ipython that I want to copy/log of all displayed values/outputs? The error messages are valuable to me. many thanks, |
No there is basically the same difference as the return value of a function and the function printing something
You can try to use the %%capture magic, but I'm not sure of how much it can capture though. |
@pleabargain what you want to do is use the %%capture magic
and then you'll have |
I want to export/ print the input and the output from history but:
%history -n 10-11 -o
and
%history -o -n 10-11
produce the same results
Is this a bug?
here's the notebook
history issue starts at line 19 in notebook
http://pastebin.com/XpFd5QkT
The text was updated successfully, but these errors were encountered: