Exemple #1
0
 def _para(self, *paraArgs):
     """ssh to the remote machine and run the para command.  paraArgs are
     passed as arguments to the para command. Returns stdout as a list of
     lines, stderr in ProcException if the remote program encouners an
     error. There is a possibility for quoting hell here."""
     remCmd = "cd " + self.paraDir + "; para " + " ".join(paraArgs)
     fileOps.prLine(sys.stderr, "ssh ", self.paraHost, " ", remCmd)
     return procOps.callProcLines(
         ["ssh", "-o", "ClearAllForwardings=yes", self.paraHost, remCmd])
Exemple #2
0
 def dump(self, fh, desc=None):
     self.__calcParams()
     if desc != None:
         prLine(fh, desc)
     prLine(fh, "  data:  len: ", len(self.data), "  min: ", self.data.min, "  max: ", self.data.max)
     prLine(fh, "  bins:  num: ", self.numBins, "  size: ", self.binSize, "  min: ", self.binMin, "  max: ", self.binMax)
     prLine(fh, "  use:  num: ", self.numBinsUse, "  size: ", self.binSizeUse, "  min: ", self.binMinUse, "  max: ", self.binMaxUse,
            "  floor: ", self.binFloorUse, "  ceil: ", self.binCeilUse)
Exemple #3
0
 def dump(self, fh, desc=None):
     self.__calcParams()
     if desc != None:
         prLine(fh, desc)
     prLine(fh, "  data:  len: ", len(self.data), "  min: ", self.data.min,
            "  max: ", self.data.max)
     prLine(fh, "  bins:  num: ", self.numBins, "  size: ", self.binSize,
            "  min: ", self.binMin, "  max: ", self.binMax)
     prLine(fh, "  use:  num: ", self.numBinsUse, "  size: ",
            self.binSizeUse, "  min: ", self.binMinUse, "  max: ",
            self.binMaxUse, "  floor: ", self.binFloorUse, "  ceil: ",
            self.binCeilUse)
Exemple #4
0
def prExceptions(er, ex):
    "print and exception and any recorded ones"
    sys.stdout.flush()
    sys.stderr.flush()
    fh = sys.stderr
    fileOps.prLine(fh, "\n"+strOps.dup(78, '='))
    fileOps.prLine(fh, "Unexpected exception:")
    fileOps.prLine(fh, ProcException.formatExcept(ex))
    for e in er.errors:
        fileOps.prLine(fh, strOps.dup(78, '-'))
        fileOps.prLine(fh, ProcException.formatExcept(e))
    fileOps.prLine(fh, strOps.dup(78, '^'))
    sys.stderr.flush()
Exemple #5
0
 def dump(self, fh):
     "print content to file"
     prLine(fh, "query:  ", self.qSeq)
     prLine(fh, "target: ", self.tSeq)
     for blk in self:
         blk.dump(fh)
Exemple #6
0
 def dump(self, fh):
     "print content to file"
     prLine(fh, "\t> query:  ", self.q)
     prLine(fh, "\t  target: ", self.t)
Exemple #7
0
def prExceptions(er, ex):
    "print and exception and any recorded ones"
    sys.stdout.flush()
    sys.stderr.flush()
    fh = sys.stderr
    fileOps.prLine(fh, "\n" + strOps.dup(78, '='))
    fileOps.prLine(fh, "Unexpected exception:")
    fileOps.prLine(fh, ProcException.formatExcept(ex))
    for e in er.errors:
        fileOps.prLine(fh, strOps.dup(78, '-'))
        fileOps.prLine(fh, ProcException.formatExcept(e))
    fileOps.prLine(fh, strOps.dup(78, '^'))
    sys.stderr.flush()