/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Properties | Private Member Functions
DybPython::dbcmd::CommandLine Class Reference
Inheritance diagram for DybPython::dbcmd::CommandLine:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def __str__
def __call__

Properties

 exepath = property( _exepath )
 cmd = property( lambda self:self._cmd % self )
 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 8 of file dbcmd.py.


Constructor & Destructor Documentation

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

Definition at line 22 of file dbcmd.py.

00023                                      :
00024         dict.__init__(self, *args, **kwa )
00025         exe = self.exepath
00026         assert exe, "cannot find executable %r check your PATH " % self._exenames
00027         self['exepath']=exe
00028         self['path']="/dev/null"
00029         self['argline']=""


Member Function Documentation

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

Definition at line 12 of file dbcmd.py.

00013                       :
00014         for cmd in self._exenames:
00015             which = os.popen("which %s" % cmd).read().rstrip("\n")
00016             if os.path.exists(which):
00017                 return which
        return None
def DybPython::dbcmd::CommandLine::__str__ (   self)

Definition at line 30 of file dbcmd.py.

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

def DybPython::dbcmd::CommandLine::__call__ (   self,
  kwa 
)

Definition at line 33 of file dbcmd.py.

00034                              :
00035         verbose = kwa.pop('verbose', False)
00036         self.update(kwa)
00037         if verbose:
00038             log.info(self)
00039         else:
00040             log.debug(self)
00041         return os.popen(self.cmd).read()        


Property Documentation

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

Definition at line 18 of file dbcmd.py.

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

Definition at line 19 of file dbcmd.py.

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

Definition at line 20 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 Fri May 16 2014 09:55:40 for DybPython by doxygen 1.7.4