On Sunday, September 16, 2012 5:32:09 PM UTC+1, 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!
>
> Thanks.
>
> Simon.
Many thanks for the many answers, unfortunately I am still struggling.
The python script ends with:
sys.stdout.write(refs[int(chosen[1])][0])
When I run the script with %!nameofscript the correct answer is replaces the content of the current buffer. I still can't seem able to pipe it into a variable. Could it be because the python script gets user input from a dialog box that they have to select by pressing Enter?
Thanks again for all your assistance.
Simon.
--
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
Sunday, September 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment