Package qb :: Package backend :: Module pythonChildHandler
[hide private]
[frames] | no frames]

Module pythonChildHandler

source code

This module defines 2 tightly-coupled classes; PyCmdDispatcher and PyCmdExecutor, along with 3 other classes used as FIFO's, PfxUnixFIFO and PfxNamedPipeFIFO, which derive from PfxFIFO.

They are used to spawn a python child process and send commands to that process. The PyCmdDispatcher instance is the parent and dispatches commands to the child, which has a PyCmdExecutor instance.

Commands are dispatched over the child's stdin.

The success or failure of the PyCmdExecutor's ability to execute the command is communicated back to the PyCmdDispatcher over a FIFO-like object, which is an PfxFIFO instance.

Classes [hide private]
  PyCmdDispatcher
The PyCmdDispatcher class is used by qube python jobtypes to execute commands through an abstracted application or shell.
  PyCmdExecutor
The PyCmdExecutor class is used by qube loadOnce python jobtypes.
  PFXRequestHandler
  PFXSimpleSocketServer
Listens for output from PFXSimpleClient on the same host, usually running in another python interpreter inside a 3rd-party application such as Maya.
  PFXSimpleClient
Functions [hide private]
 
getThisModulePath() source code
Variables [hide private]
  buffer_lock = threading.Lock()
  thisDir = getThisModulePath() [1]
  childBootStrapper = os.path.join(thisDir, 'child_bootstrapper....
  pyCmdLine = '%s -u "%s" --port __PORT__' %(sys.executable, os....
  childArgs = ['/bin/tcsh', '-c', pyCmdLine]
  cd = PyCmdDispatcher(childArgs, debug= False)
  exit_code = cd.close()
  __package__ = 'qb.backend'
Variables Details [hide private]

childBootStrapper

Value:
os.path.join(thisDir, 'child_bootstrapper.py')

pyCmdLine

Value:
'%s -u "%s" --port __PORT__' %(sys.executable, os.path.normpath(childB\
ootStrapper))