[IPython-dev] Run code at startup
Sat Oct 29 19:15:45 CDT 2011
On Sat, Oct 29, 2011 at 4:57 PM, Thomas Kluyver <firstname.lastname@example.org> wrote:
> I proposed in #914 that we offer a simpler way to do this. Min's written a
> neat implementation that will check for .py and .ipy files in a directory
> like .ipython/profile_default/startup/ . I think this is a big improvement -
> if people want a custom magic command, they can simply drop a file into a
> folder, without delving into the config at all. Does anyone see a reason not
> to add this feature?
No objection from me, I agree it's simpler both to explain and to do
For simplicity of the mental model, the semantics of putting foo.py in
startup/ should be in every respect identical to those of adding it to
exec_files. That is, files in startup/ should be run by the same code
that handles the exec_files list, so the behavior regarding errors,
listing of contents by %who, etc, is the same.
It's basically a simpler way to set exec_files by having a
conventional startup/ directory, which is OK by me.
More information about the IPython-dev