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
%Store eliminated in configuration and magic commands in 0.11 #684
Comments
We do intend to restore %store or something equivalent before the next release, I think. |
That'd be great. Is there anything similar one can do now to keep macros between sessions. Like a function to declare a macro that could be loaded on ipython startup. Cheers, |
If you use the new config files, and find ...exec_lines = ["""mymacrocode = "print 'Hello world!'" """, """%macro mymacro mymacrocode"""] I haven't tested this, but it should work. I don't think there's a way to interactive store a macro, though. |
Thanks for that. I'll check it in the next couple days if that will work On 07/08/11 21:41, takluyver wrote:
|
I used store a lot. Guess I'm going back to the old ipython for now. |
It is not that bad without it I realized because saves multiline On 29/09/11 06:16, Keith Solademi wrote:
|
Sorry no-one's got round to bringing it back yet. If either of you would like to work on it, you'll need to update the quarantined pspersistence module to the new API. Its current code is here: https://github.com/ipython/ipython/blob/master/IPython/quarantine/pspersistence.py We can of course provide more information if you want to ask questions on the mailing list. |
Where is the relevant info on the new API? Seems like it shouldn't be Cheers On 29/09/11 10:11, Thomas wrote:
|
I'm not sure if there is a neat source for what changed, unfortunately. At a brief glance, I think the only thing that changes is how we register magics. Have a look at how it's done for history: https://github.com/ipython/ipython/blob/master/IPython/core/interactiveshell.py#L1875 Also, if you're interested in persistence, I wrote down a few thoughts about what we might do in the future. In particular, using dill (an extension to pickle) might be interesting, because we could store objects like functions which we can't currently. |
I'll have a look. Thanks. On 29/09/11 10:33, Thomas wrote:
|
Great, thanks. To explain a bit more about the initialisation: in the old design, modules |
%store is now back in an extension for 0.12. To load it, do |
Sorry!! For some reason it didn't work at first try for storing macros that were defined but restarted and now it's a go. THANKS FOR THE HARD WORK!!!!!! |
You're welcome. Let me know if you can replicate any problems with it. I should probably check the documentation, I didn't look at updating any of |
I think the documentation appears to be good. I just had forgot that it stores the macro as a variable. Then the variable can be stored. You're welcome. Let me know if you can replicate any problems with it. I should probably check the documentation, I didn't look at updating any of Reply to this email directly or view it on GitHub: Sent via BlackBerry® from Vodafone |
I had used in console the store command to store macros for multiple sessions. I noticed this has been removed in the console and in qtconsole in 0.11. I haven't seen anything to store macros persistently across sessions so I am guessing this is a regression that should have made it into 0.11 but didn't for one reason or another.
The text was updated successfully, but these errors were encountered: