Tuesday, May 3, 2016

Confirm dialog called by python vim.command fails

Hi,


Passing joined python list to the confirm dialog function through vim.command feature in python code, I encounter these errors :

Error detected while processing :
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 16, in PyExecReplace
File "<string>", line 144, in <module>
File "<string>", line 10, in question
vim.error: Vim(let):E121: Undefined variable: Today


_____________

Here is my source code :


class IntervalDating(): # Dating considerations
def __init__(self):
self.datingChoice = [ 'Today', 'Yesterday', 'ThisWeek' ]
def question(self):
someStr = "\n&".join(self.datingChoice)
print someStr
vim.command('let cce = confirm("Period choice:", ' + someStr + ', 1)')

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: