Monday, March 28, 2011

Re: python time.strptime: _strptime not found

On 01/18/2011 03:26 PM, AK wrote:
> I'm having a strange intermittent problem with vim7.3's python
> on Ubuntu 10.04. When I start it up, my script that uses
> time.strptime works just fine. However, after a few hours,
> for no discernible reason, it stops working and time.strptime
> complains that _strptime is not found. After a vim restart,
> it works fine again. This only started happening after, I guess,
> automatic ubuntu update in the last couple of days.
>
> Any clue will be happily appreciated. -ak


I'm still having the same problem intermittently, about once
or twice a day although sometimes I can go a few days without
this issue. After a restart (from a saved session or full
restart), things work fine again. Has anyone else ran into
this issue?

I'm not sure I was very clear in the original post, I'm
using vim python script in this manner:

:au BufNewFile,BufRead *.trak nnoremap <buffer> <CR> :call
Trak("start_stop")<CR>

function! Trak(...)
:pyfile ~/.vim/python/trak.py
endfu

and in that script:

from vim import *

def start_stop(): ...

if __name__ == "__main__":
cmd = exist_eval("a:1")
if cmd: globals()[cmd]()


The error I get is the standard python error when a module can't be
imported, which means python sys.path gets messed up somehow. I don't
have it copied since I always forget how to yank from vim message area..
but I can copy it and post here if that's important.

Does anyone have any hints/suggestions? I don't know how to approach
this and it's very annoying when it happens.

Thanks! - Rainyday

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