Currently I am passing arguments like:
class ExampleCommand( sublime_plugin.TextCommand ):
def run( self, edit ):
view = self.view
old_selections = []
for selection in view.sel():
old_selections.append( selection.end() )
window.run_command( "assistant", { "args" : old_selections } )
class AssistantCommand( sublime_plugin.TextCommand ):
def run( self, edit, **kargs ):
old_selections = kargs["args"]
print( str( old_selections ) )
But I think it would be better for performance directly receiving it, then I tried this:
class AssistantCommand( sublime_plugin.TextCommand ):
def run( self, edit, *old_selections ):
print( str( old_selections ) )
But throws the error:
Traceback (most recent call last):
File "D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\sublime_plugin.py", line 812, in run_
return self.run(edit, **args)
TypeError: run() got an unexpected keyword argument 'args'