That is, unfortunately, only available on linux, whereas I am looking for a 
more generic solution.

I noticed that vim has a v:progname variable, which unfortunately only displays 
the executable, without the path. Any way to expand that into the full path?

On Wednesday, March 12, 2014 10:35:18 PM UTC+2, Gary Johnson wrote:
> On 2014-03-12, Viktor Kojouharov wrote:
> 
> > I was hoping using the python sys.argv would return the vim path
> 
> > as the first item, but its filled with garbage? Is there any way
> 
> > to get it, either from a built-in viml function or from the python
> 
> > interface?
> 
> 
> 
> I don't know about Windows, but on Linux you can get it from either
> 
> of these.
> 
> 
> 
>     substitute(system('readlink /proc/$PPID/exe'), '\n$', '', '')
> 
>     substitute(system('ls -l /proc/$PPID/exe'), '^.*-> \(.*\)\n$', '\1', '')
> 
> 
> 
> HTH,
> 
> Gary

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui