launching vi/vim from console

adm avinash.magar at gmail.com
Mon May 24 08:31:58 EDT 2010


On May 24, 4:59 pm, Jean-Michel Pichavant <jeanmic... at sequans.com>
wrote:
> adm wrote:
> > I am newbie to python.
> > Is there a way to launch vi/vim or any other editor from python
> > console? I find editing in console very limiting. I can either have a
> > console which launches vi and remembers it's content and then executes
> > or invoke python interpreter from vim.
>
> > Since I could not find anything I wrote this:http://python.pastebin.com/MFTHxuLe
> > Please suggest if there is any better alternative for this.
> > I tried googling for this but could not find anything interesting.
>
> > Thanks,
> > Adm
>
> import os
> os.system.('vi')
>
> or you can start an ipython shell
>  and start vi using
> !vi

Thanks. I wanted something like ipython.
I will give it a try.



More information about the Python-list mailing list