launching vi/vim from console

A

adm

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
 
J

Jean-Michel Pichavant

adm said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top