Table of Contents

Class: _CommandHandle Bio/Tools/MultiProc/copen.py

This file-like object is a wrapper around a command.

Members: pid what is the PID of the subprocess? killsig what signal killed the child process? status what was the status of the command? error if an error occurred, this describes it.

Methods: close Close this process, killing it if necessary. fileno Return the fileno used to read from the process. wait Wait for the process to finish. poll Is the process finished? elapsed How much time has this process taken? read readline readlines

Methods   
__del__
__init__
_cleanup_child
close
elapsed
fileno
poll
read
readline
readlines
wait
  __del__ 
__del__ ( self )

  __init__ 
__init__ (
        self,
        pid,
        cread,
        errread=None,
        )

_CommandHandle(pid, cread[, errread]) -> instance

Create a wrapper around a command. pid should be the process ID of the command that was created, probably by a fork/exec. cread should be a file object used to read from the child. If errread is given, then I will look there for messages pertaining to error conditions.

  _cleanup_child 
_cleanup_child ( self )

  1. _cleanup_child()

    Do necessary cleanup functions after child is finished running.

Exceptions   
etype, value
  close 
close ( self )

  1. close()

    Close the process, killing it if I must.

  elapsed 
elapsed ( self )

  1. elapsed() -> num seconds

    How much time has elapsed since the process began?

  fileno 
fileno ( self )

  1. fileno() -> file descriptor

    Return the file descriptor associated with the pipe.

  poll 
poll ( self )

  1. poll() -> boolean

    Is the process finished running?

  read 
read ( self )

  1. read() -> string

    Return the output as a string.

  readline 
readline ( self )

  1. readline() -> string

    Return the next line read, or '' if finished.

  readlines 
readlines ( self )

  1. readlines() -> list of strings

    Return the output as a list of strings.

  wait 
wait ( self )

  1. wait()

    Wait until the process is finished.


Table of Contents

This document was automatically generated on Mon Jul 1 12:03:05 2002 by HappyDoc version 2.0.1