Re: [PyMOL] Command varargs

2020-07-30 Thread Thomas Holder
Hi Pedro, Add `_self=pymol.cmd` as a keyword argument, then it should work properly as a command. @pm.extend def func(*args, kw1=1, kw2=True, _self=pm): pass Cheers, Thomas On Thu, Jul 30, 2020 at 11:52 AM Pedro Lacerda wrote: > > Hi, > > How can I accept variable arguments in my command?

[PyMOL] Command varargs

2020-07-30 Thread Pedro Lacerda
Hi, How can I accept variable arguments in my command? My first attempt was: @pm.extend def func(*args, kw1=1, kw2=True): pass -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1856 http://latte