Пример #1
0
 def action(args=''):
     cmd = pygmi.find_script(name)
     if cmd:
         call(pygmi.shell,
              '-c',
              '$* %s' % args,
              '--',
              cmd,
              background=True)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 def action(args=''):
     cmd = pygmi.find_script(name)
     if cmd:
         call(pygmi.shell, '-c', '$* %s' % args, '--', cmd,
              background=True)