Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-24 Thread Nikolay Pavlov
On Oct 24, 2013 6:34 AM, "Yggdroot Chen" wrote: > > 在 2013年10月19日星期六UTC+8上午1时01分43秒,ZyX写道: > > On Friday, October 18, 2013 7:12:52 PM UTC+4, ZyX wrote: > > > > now I redescribe my issue, I want to do some cleanup actions after ctrl-c is pressed. the code is as below: > > > > def func(): > > > >

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-23 Thread Yggdroot Chen
在 2013年10月19日星期六UTC+8上午1时01分43秒,ZyX写道: > On Friday, October 18, 2013 7:12:52 PM UTC+4, ZyX wrote: > > > now I redescribe my issue, I want to do some cleanup actions after ctrl-c > > > is pressed. the code is as below: > > > def func(): > > > try: > > > while 1: > > >

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-18 Thread Yggdroot Chen
在 2013年10月18日星期五UTC+8下午11时12分52秒,ZyX写道: > > now I redescribe my issue, I want to do some cleanup actions after ctrl-c > > is pressed. the code is as below: > > def func(): > > try: > > while 1: > > xxx > > xxx > > except KeyboardInterrupt: > >

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-18 Thread ZyX
On Friday, October 18, 2013 7:12:52 PM UTC+4, ZyX wrote: > > now I redescribe my issue, I want to do some cleanup actions after ctrl-c > > is pressed. the code is as below: > > def func(): > > try: > > while 1: > > xxx > > xxx > > except KeyboardInt

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-18 Thread ZyX
> now I redescribe my issue, I want to do some cleanup actions after ctrl-c is > pressed. the code is as below: > def func(): > try: > while 1: > xxx > xxx > except KeyboardInterrupt: > vim.command("") > > then the issue occurs, how to

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Yggdroot Chen
在 2013年10月17日星期四UTC+8下午6时14分36秒,Yggdroot Chen写道: > I encounter a critical issue when writing vim script using python, for > example the code is as below: > > > > def func(): > > try: > > while 1: > > xxx > > xxx > > except KeyboardInterrupt: > >

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Yggdroot Chen
在 2013年10月18日星期五UTC+8上午12时10分12秒,Ben Fritz写道: > On Thursday, October 17, 2013 10:08:19 AM UTC-5, Yggdroot Chen wrote: > > > 在 2013年10月17日星期四UTC+8下午9时54分53秒,Ben Fritz写道: > > > > The issue is you're trying to prevent the user from rescuing their Vim > > > from a misbehaving command. You are trying

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Nikolay Pavlov
On Oct 17, 2013 9:28 PM, "Nikolay Pavlov" wrote: > > > On Oct 17, 2013 8:28 PM, "Nikolay Pavlov" wrote: > > > > > > On Oct 17, 2013 7:46 PM, "Yggdroot Chen" wrote: > > > > > > 在 2013年10月17日星期四UTC+8下午10时11分28秒,ZyX写道: > > > > On Oct 17, 2013 5:50 PM, "Yggdroot Chen" wrote: > > > > > > > > > > I e

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Nikolay Pavlov
On Oct 17, 2013 8:28 PM, "Nikolay Pavlov" wrote: > > > On Oct 17, 2013 7:46 PM, "Yggdroot Chen" wrote: > > > > 在 2013年10月17日星期四UTC+8下午10时11分28秒,ZyX写道: > > > On Oct 17, 2013 5:50 PM, "Yggdroot Chen" wrote: > > > > > > > > I encounter a critical issue when writing vim script using python, for exam

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Nikolay Pavlov
On Oct 17, 2013 7:46 PM, "Yggdroot Chen" wrote: > > 在 2013年10月17日星期四UTC+8下午10时11分28秒,ZyX写道: > > On Oct 17, 2013 5:50 PM, "Yggdroot Chen" wrote: > > > > > > I encounter a critical issue when writing vim script using python, for example the code is as below: > > > > > > def func(): > > > try: >

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Ben Fritz
On Thursday, October 17, 2013 10:08:19 AM UTC-5, Yggdroot Chen wrote: > 在 2013年10月17日星期四UTC+8下午9时54分53秒,Ben Fritz写道: > > The issue is you're trying to prevent the user from rescuing their Vim from > > a misbehaving command. You are trying to potentially cause data loss when > > they need to force

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Yggdroot Chen
在 2013年10月17日星期四UTC+8下午10时11分28秒,ZyX写道: > On Oct 17, 2013 5:50 PM, "Yggdroot Chen" wrote: > > > > I encounter a critical issue when writing vim script using python, for > > example the code is as below: > > > > def func(): > >     try: > >         while 1: > >             xxx > >             xxx

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Yggdroot Chen
在 2013年10月17日星期四UTC+8下午9时54分53秒,Ben Fritz写道: > On Thursday, October 17, 2013 5:14:36 AM UTC-5, Yggdroot Chen wrote: > > > I encounter a critical issue when writing vim script using python, for > > example the code is as below: > > > > > > > > > > > > def func(): > > > > > > try:

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Nikolay Pavlov
On Oct 17, 2013 5:50 PM, "Yggdroot Chen" wrote: > > I encounter a critical issue when writing vim script using python, for example the code is as below: > > def func(): > try: > while 1: > xxx > xxx > except KeyboardInterrupt: > pass > > vim.comm

Re: vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Ben Fritz
On Thursday, October 17, 2013 5:14:36 AM UTC-5, Yggdroot Chen wrote: > I encounter a critical issue when writing vim script using python, for > example the code is as below: > > > > def func(): > > try: > > while 1: > > xxx > > xxx > > except Key

vim.command() always throw exception after KeyboardInterrupt

2013-10-17 Thread Yggdroot Chen
I encounter a critical issue when writing vim script using python, for example the code is as below: def func(): try: while 1: xxx xxx except KeyboardInterrupt: pass vim.command("") I press ctrl-c to interrupt the program, after Keyboa