A vim-script file calls a python script through:
let s:pyscript = resolve(expand('<sfile>:p:h:h')) . '/pyscript/deploy.py'
echom "sourcing " . s:pyscript
pyfile s:pyscript
the echom-command shows me the expansion points to the correct file, but the following pyfile s:pyscript
results in an error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] file or directory not found: '&s:pyscript'
Which let's me conclude, that everythin after pyfile is immediately considered "python" and vim doesn't evaluate the s:pyscript variable.
What's the way around it? Either in the python-script or the vim-"master" script is fine.