[Tutor] Invoking Python from Vim

Carroll, Barry Barry.Carroll at datalogic.com
Fri Jun 8 17:02:46 CEST 2007


> -----Original Message-----
> Date: Fri, 8 Jun 2007 00:19:39 +0100
> From: "Alan Gauld" <alan.gauld at btinternet.com>
> Subject: Re: [Tutor] Invoking Python from Vim
> To: tutor at python.org
> Message-ID: <f4a3qc$2u6$1 at sea.gmane.org>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> 	reply-type=original
> 
> 
> "Matt Smith" <matt at mattanddawn.orangehome.co.uk> wrote
> 
> > Do any Vim users have a better way of running a Python program while
> > it
> > is being edited in Vim?
> 
> My personal preference is to have 3 windows open:
> 
> 1) gvim for editing the files
> 2) a console for running the files using command recall to do so
> 3) a console running a python shell prompt
>     (actually nowadays I'm using a a PyCrust shell)
> 
> And I alt-tab between the windows.
> 
> This way I can experiment in PyCrust, copy the resultant experiments
> into gvim and run the program, keeping the error messages etc
> visible without sacrificing gvim window space.
> 
> The downside is the alt-tab required to switch to the right window
> and an up-arrow press to recall the python command to re-execute
> each time.
> 
> Alan G.
> 
My setup is similar to Alan's:

	* Windows XP 
	* Python Enthought Edition
	* Iron Python shell for experimenting/prototyping
	* GviM for editing
	* Standard Command prompt window for execution

It isn't a sophisticated, "integrated" solution, but it works quite
well.  Sometimes the simple ideas are the best.  Remember this famous
exchange:

     Devil:   "Take the easy path. I brought you a suite of applications

               that all work together."
     Dilbert: "That's unnatural!!!  Be gone!!!"

Regards,
 
Barry
barry.carroll at datalogic.com
541-302-1107
________________________
We who cut mere stones must always be envisioning cathedrals.

-Quarry worker's creed
 



More information about the Tutor mailing list