[IPython-user] <dir> alias, and using %edit
johnjsal at rcn.com
Mon Mar 13 08:51:16 CST 2006
On 3/12/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> John Salerno wrote:
> > Hi everyone. I just started using IPython and I have two questions. The
> > first concerns the dir alias. Every time I start IPython, I get a
> message at
> > the top of the console window that says "Deleting alias <dir>, it's a
> > keyword or built-in." Is this normal? Is there a way to prevent this
> > happening, or remove it altogether?
> I'll leave it to our windows experts to help with this one, since I don't
> win32 at all.
My guess as to what's happening here is that IPython is creating an alias
called 'dir' since dir is a DOS prompt command in Windows, but when IPython
starts up, it automatically deletes the alias because it conflicts with the
built-in Python function of the same name. So it seems what I need to do is
somehow change the 'dir' alias (to 'dr', perhaps) so this conflict doesn't
occur. I assume it must be done in an external file, because once IPython
starts, I won't have a change to edit the aliases before dir is deleted.
So hopefully someone can tell me how to do this, and which file(s) to edit.
I hope there aren't too many files that I would have to change.
> Second concerns using %edit to open an external editor. After a little
> > trouble getting it to work with Ultra-Edit, I realized that I needed to
> > quotes around the parts of the path that contained spaces:
> > C:\"Program Files"\"IDM Computer Solutions"\Ultra-Edit\uedit32.exe
> > This now opens UE, but it also tries to open files with names equal to
> > values after each space, i.e. Files, Computer, and Solutions. Is there a
> > to fix this?
> What happens if you try instead to set the editor variable to:
> "C:\Program Files\IDM Computer Solutions\Ultra-Edit\uedit32.exe"
> with a single set of quotes around the whole thing? I think that should
Yes, that did the trick. Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user