|
HWRF
trunk@4391
|
This is part of the internal implementation of Runner, used to convert it to a produtil.pipeline.Pipeline for execution. More...
This is part of the internal implementation of Runner, used to convert it to a produtil.pipeline.Pipeline for execution.
It represents stdin, stdout or stderr being connected to an open file. It instructs the Runner to open the file before starting the process.
Public Member Functions | |
| def | __init__ |
| FileOpener constructor. More... | |
| def | copy (self) |
| Creates a shallow copy of this object. More... | |
| def | to_shell (self) |
| Creates a POSIX sh representation of the part of the command that requests redirection. More... | |
| def | intmode (self) |
| Returns an integer version of mode suitable for os.open. | |
| def | __repr__ (self) |
| Returns a string representation of this object as valid Python code. More... | |
| def | repr_for_in (self) |
| Part of the implementation of Runner.__repr__, this returns the filename and ",string=False". More... | |
| def | repr_for_out (self) |
| Part of the implementation of Runner.__repr__, this returns the filename and ",string=False". More... | |
| def | repr_for_err (self) |
| Same as repr_for_out. 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 | |
| filename | |
| the name of the file being opened | |
| mode | |
| how the file is being opened | |
| err | |
| If True, this is for stderr. More... | |
| def produtil.prog.FileOpener.__init__ | ( | self, | |
| filename, | |||
| mode, | |||
err = False |
|||
| ) |
FileOpener constructor.
| filename | the name of the file being opened |
| mode | how it is being opened |
| err | if True, this is for stderr |
| def produtil.prog.FileOpener.__repr__ | ( | self | ) |
Returns a string representation of this object as valid Python code.
Definition at line 188 of file prog.py.
Referenced by produtil.prog.Runner.__str__().
| def produtil.prog.FileOpener.copy | ( | self | ) |
Creates a shallow copy of this object.
Definition at line 157 of file prog.py.
Referenced by produtil.prog.ImmutableRunner.runner().
| def produtil.prog.FileOpener.repr_for_err | ( | self | ) |
| def produtil.prog.FileOpener.repr_for_in | ( | self | ) |
Part of the implementation of Runner.__repr__, this returns the filename and ",string=False".
| def produtil.prog.FileOpener.repr_for_out | ( | self | ) |
Part of the implementation of Runner.__repr__, this returns the filename and ",string=False".
It also appends ",append=X" where X is the true/false flag for appending to the file.
Definition at line 196 of file prog.py.
Referenced by produtil.prog.StreamGenerator.repr_for_err(), and produtil.prog.FileOpener.repr_for_err().
| def produtil.prog.FileOpener.to_shell | ( | self | ) |
| produtil.prog.FileOpener.err |
If True, this is for stderr.
Definition at line 147 of file prog.py.
Referenced by produtil.prog.Runner.__init__(), produtil.prog.FileOpener.copy(), and produtil.prog.FileOpener.to_shell().
1.8.10