Loading ...
Sorry, an error occurred while loading the content.

Re: Passing arguments to python scripts

Expand Messages
  • Benji Fisher
    ... IMHO, more tips are better. Try it, and see whether anyone cares enough to rate it. HTH --Benji Fisher
    Message 1 of 9 , Dec 30, 2003
    View Source
    • 0 Attachment
      On Tue, Dec 30, 2003 at 12:31:17PM -0800, Iain Duncan wrote:
      >
      > Thanks Bram. I actually stumbled upon that solution myself last night and it
      > seems to do all that I need. The python script is now a python function with
      > an arg list like:
      >
      > def mypythonfunction( *args ):
      >
      > and it receives its args from the vim user command
      >
      > :command -nargs=+ MyCom :py myfun(<f-args>)
      >
      > This allows me to just type:
      >
      > :MyCom foo bar 1,2 -mblah blah etc
      >
      > and get all the space seperated strings as seperate args inside the python
      > function. Would this be something I should maybe write a tip for for the Vim
      > site? I'm still rather new to all this an warry of posting unecessary noise
      > . . . ; )

      IMHO, more tips are better. Try it, and see whether anyone cares
      enough to rate it.

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.