Sunday, September 16, 2012

Re: Putting stdout from Python into vim

On 09/16/2012 07:32 PM, Simon W. Jones wrote:
> Hello,
>
> I am trying to capture the stdout (a simple digit) from a python script that I am calling from vim and assign it to a variable. I have been trying redir but can't seem to get it to work.
>
> Any help would be appreciated!

Redir worked just fine for me

:redir @a
:py import sys
:py print 2
:redir END
:echo @a

The code will display "2" preceded and followed by few new-lines

Timothy Madden

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: