| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybPython::dbcmd::CommandLine Class Reference

Inheritance diagram for DybPython::dbcmd::CommandLine:
[legend]
List of all members.

Public Member Functions

def __init__
def __str__
def __call__

Static Public Attributes

tuple exepath = property( _exepath )
tuple cmd = property( lambda self:self._cmd % self )
tuple cmd_nopw = property( lambda self:self._cmd % dict(self, password="***") )

Private Member Functions

def _exepath

Detailed Description

Base class for composing and invoking command lines in a separate process 

Definition at line 5 of file dbcmd.py.


Member Function Documentation

def DybPython::dbcmd::CommandLine::_exepath (   self  )  [private]

Definition at line 7 of file dbcmd.py.

00009                       :
00010         for cmd in self._exenames:
00011             which = os.popen("which %s" % cmd).read().rstrip("\n")
00012             if os.path.exists(which):
                return which

def DybPython::dbcmd::CommandLine::__init__ (   self,
  args,
  kwa 
)

Definition at line 17 of file dbcmd.py.

00017                                     :self._cmd % dict(self, password="***") )
00018 
00019     def __init__(self, *args, **kwa ):
00020         dict.__init__(self, *args, **kwa )
00021         exe = self.exepath
00022         assert exe, "cannot find executable %r check your PATH " % self._exenames

def DybPython::dbcmd::CommandLine::__str__ (   self  ) 

Definition at line 23 of file dbcmd.py.

00025                      :
        return "%s %s " % (self.__class__.__name__, self.cmd_nopw )

def DybPython::dbcmd::CommandLine::__call__ (   self,
  verbose = False 
)

Definition at line 26 of file dbcmd.py.

00028                                      :
00029         if verbose:
00030             print self
00031         return os.popen(self.cmd).read()        


Member Data Documentation

tuple DybPython::dbcmd::CommandLine::exepath = property( _exepath ) [static]

Definition at line 13 of file dbcmd.py.

tuple DybPython::dbcmd::CommandLine::cmd = property( lambda self:self._cmd % self ) [static]

Definition at line 14 of file dbcmd.py.

tuple DybPython::dbcmd::CommandLine::cmd_nopw = property( lambda self:self._cmd % dict(self, password="***") ) [static]

Definition at line 15 of file dbcmd.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:13:02 2011 for DybPython by doxygen 1.4.7