Thursday, February 9, 2023

Passing python3 file arguments seems failing py3f

Hi,


Following vim's python help, 


"To pass arguments you need to set sys.argv[] explicitly.  Example: >

   
:python sys.argv = ["foo", "bar"]
    :pyfile myscript.py
"


I tried to pass argues to python file as this 

export def PyLinter(): void
  py3 import sys
  py3 sys.argv = ["--version"]
  exe 'py3f ' .. "path/to/somepythonfile.py"
enddef

It's like as if it had no effect :   py3 sys.argv = ["--version"]

Is it due to python3 file?
Tahnk you 
N i c  o las

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/fa00e6ca-d800-4127-b910-0abb558cabddn%40googlegroups.com.

No comments: