IDLE history, Python IDE, and Interactive Python with Vim
Fernando Perez
fperez.net at gmail.com
Tue Feb 8 00:14:24 EST 2005
Ashot wrote:
> yup, this is why I've been using it, its (almost exactly :) what I was looking
> for. I had tried it before, but was reluctant to use it because the windows
> terminal is not very appealing. Some things I've noticed so far that I think
> could be improved, some of which are minor but annoying:
I should note that I hardly use %edit myself, it's something that was added at
the request of users, and is an OK facility for quick and dirty work. But
getting such a system to work reliably in all cases, with the
import/execfile/reload issues at play, is really not easy. Especially because
it's not even completely clear what the 'right' behaviour should be. %edit
makes a few educated guesses, but that's it.
My personal coding environment consists of a permanently open editor with
multiple files open (XEmacs in my case), and an ipython session open. In
ipython, I use %run to run test code, and when said top-level test code relies
on modules which are also being changed, I simply put into the top-level
scripts reload() statements. This gives me the ipython tracebacks,
experimentation, tab-exploration of objects, etc, while I have the full power
of Xemacs for the real editing work.
IPython is NOT an IDE, so I think it's important to understand its limitations
to make the best possible use of it. Perhaps I haven't done a very good job of
outlining this to users, I don't know.
> edit doesn't work with classes even though it says it should, you have to
> point it to a function in the class (perhaps only in windows)
>
> under windows vim/gvim doesn't jump to the line of the function.. you said
> that this should work in vi, but I'm guessing its a Windows thing
Works for jed/vim under linux, that's about as much as I know. Probably a win32
thing, as you say.
> **the biggest problem for me is edit forgets code in which there were errors.
> for example:"ed" type some nonsense, and ed -p doesn't remember. Thats
> putting an awful lot of pressure on getting the syntax right everytime =]
> Perhaps I am missing something here?
Fixed. Will be in the next release, which will probably come out soon (I found
an unrelated crash case, and I consider crashes release-triggering bugfixes).
> it would be really great if the code executed on save rather than exit, but
> I'm not sure if this is possible. This would be very useful for people using
> an editor not in the console.. that way you wouldn't have to keep
> opening/closing new editor windows.
not possible in a cross-platform, cross-editor way.
> this isn't a big deal, but it would be nice if there was an easy way to refer
> to the entire history (for edit/save/etc)
%hist has options to print as many lines as you want. And the %log* commands
will dump all of your history straight to a file, and continue recording from
then on.
> would be nice if you could send stuff to the clipboard.
Do you have a linux/OSX/win32 way to do it? If so, I'll gladly include it.
Under *nix, mouse-highlighting copies to the X11 primary selection, which I can
then paste anywhere with the middle button.
> There are a few other things I'm probably forgetting, but having said all
> that, I've come off a little negative here. I really like IPython so far, its
> got all the things I was looking for, thank you very much for your work. If I
> have the time in the future I would definately contribute to this project.
No problem, I appreciate the comments. Fair, honest criticism can only make a
project better. Note, however, that I _strongly_ suggest you post this kind of
stuff on the ipython list. While I monitor c.l.py via gmane, I'm not
subscribed and sometimes I'm too busy to read it for weeks at a time, so
there's a very good chance I'll simply miss ipython-related posts here. The
ipython lists, on the other hand, I keep a close eye on :)
Best,
f
More information about the Python-list
mailing list