Package pyraf :: Module irafexecute :: Class IrafProcess
[hide private]
[frames] | no frames]

Class IrafProcess

source code

IRAF process class

Instance Methods [hide private]
 
__init__(self, executable)
Start IRAF task executable.
source code
 
initialize(self, envdict)
Initialization: Copy environment variables to process
source code
 
appendEnv(self, msg)
Append environment variable set command to list
source code
 
run(self, task, pstdin=None, pstdout=None, pstderr=None)
Run the IRAF logical task (which must be in this executable)
source code
 
isAlive(self)
Returns true if process appears to be OK
source code
 
terminate(self)
Terminate the IRAF process (when process in normal end state)
source code
 
kill(self, verbose=1)
Kill the IRAF process (more drastic than terminate)
source code
 
writeString(self, s)
Convert ascii string to IRAF form and write to IRAF process
source code
 
readString(self)
Read IRAF string from process and convert to ascii string
source code
 
write(self, data)
write binary data to IRAF process in blocks of <= 4096 bytes
source code
 
read(self)
Read binary data from IRAF pipe
source code
 
slave(self)
Talk to the IRAF process in slave mode.
source code
 
_scanErrno(self, msg) source code
 
setStdio(self)
Set self.stdin/stdout based on current state
source code
 
par_get(self, mcmd) source code
 
par_set(self, mcmd) source code
 
xmit(self)
Handle xmit data transmissions
source code
 
xfer(self)
Handle xfer data requests
source code
 
chanbytes(self)
Parse xmit(chan,nbytes) and return integer tuple
source code
 
executeClCommand(self)
Execute an arbitrary CL command
source code
Method Details [hide private]

run(self, task, pstdin=None, pstdout=None, pstderr=None)

source code 

Run the IRAF logical task (which must be in this executable)

The IrafTask object must have these methods:

getName(): return the name of the task getParam(param): get parameter value setParam(param,value): set parameter value getParObject(param): get parameter object

slave(self)

source code 

Talk to the IRAF process in slave mode. Raises an IrafProcessError if an error occurs.

setStdio(self)

source code 

Set self.stdin/stdout based on current state

If in graphics mode, I/O is done through status line. Else I/O is done through normal streams.

chanbytes(self)

source code 

Parse xmit(chan,nbytes) and return integer tuple

Assumes first 5 characters have already been checked