Pass parameters to python plumbum command from a list -
i'm using plumbum run command line utilities in foreground on python. if had command foo x y z, run plumbum so:
from plumbum import cmd, fg cmd.foo['x', 'y', 'z'] & fg in code i'm writing however, parameters ['x', 'y', 'z'] generated list. not figure out how unpack list send parameters plumbum. suggestions?
turns out have used __getitem__ this. had was:
from plumbum import cmd, fg params = ['x', 'y', 'z'] cmd.foo.__getitem__(params) & fg
Comments
Post a Comment