HWRF  trunk@4391
Public Member Functions | Public Attributes | List of all members
produtil.prog.StringInput Class Reference

Represents sending a string to a process's stdin. More...

Detailed Description

Represents sending a string to a process's stdin.

Definition at line 205 of file prog.py.

Inheritance diagram for produtil.prog.StringInput:
produtil.prog.StreamGenerator

Public Member Functions

def __init__ (self, obj)
 Creates a StringInput that sends the specified object to stdin. More...
 
def copy (self)
 Returns a shallow copy of this object. More...
 
def __repr__ (self)
 Returns a string representation of this object as valid Python code. More...
 
def to_shell (self)
 Converts this object, if possible, to an echo command followed by a pipe ("|"). More...
 
def repr_for_in (self)
 Part of the implementation of Runner.__repr__. More...
 
- Public Member Functions inherited from produtil.prog.StreamGenerator
def for_input (self)
 Has no effect. More...
 
def for_output (self)
 Has no effect. More...
 
def repr_for_err (self)
 Returns the stderr value. More...
 

Public Attributes

 obj
 the object to send to stdin
 

Constructor & Destructor Documentation

def produtil.prog.StringInput.__init__ (   self,
  obj 
)

Creates a StringInput that sends the specified object to stdin.

Parameters
objthe object to send to stdin

Definition at line 207 of file prog.py.

Member Function Documentation

def produtil.prog.StringInput.__repr__ (   self)

Returns a string representation of this object as valid Python code.

Definition at line 222 of file prog.py.

Referenced by produtil.prog.Runner.__str__().

def produtil.prog.StringInput.copy (   self)

Returns a shallow copy of this object.

Definition at line 215 of file prog.py.

Referenced by produtil.prog.ImmutableRunner.runner().

def produtil.prog.StringInput.repr_for_in (   self)

Part of the implementation of Runner.__repr__.

If possible, this creates valid Python code to represent specifying sending the given string to the stdin of a Runner. If the string is too long, it is abbreviated.

Definition at line 230 of file prog.py.

def produtil.prog.StringInput.to_shell (   self)

Converts this object, if possible, to an echo command followed by a pipe ("|").

Definition at line 226 of file prog.py.


The documentation for this class was generated from the following file: