def action(args=''): cmd = pygmi.find_script(name) if cmd: call(pygmi.shell, '-c', '$* %s' % args, '--', cmd, background=True)
def __getattr__(self, name): if name.startswith('_') or name.endswith('_'): raise AttributeError() if hasattr(self, name + '_'): return getattr(self, name + '_') cmd = pygmi.find_script(name) if not cmd: raise AttributeError() return lambda args='': call(pygmi.shell, '-c', '$* %s' % args, '--', cmd, background=True)
def __getattr__(self, name): if name.startswith('_') or name.endswith('_'): raise AttributeError() if hasattr(self, name + '_'): return getattr(self, name + '_') cmd = pygmi.find_script(name) if not cmd: raise AttributeError() return lambda args='': call( pygmi.shell, '-c', '$* %s' % args, '--', cmd, background=True)